Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10325

Custom file mode for lastrunreport as defined in puppet.conf is ignored

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 6.13.0
    • Fix Version/s: PUP 6.15.0
    • Component/s: None
    • Labels:
    • Template:
      PUP Bug Template
    • Agent OS:
      CentOS 7
    • Master OS:
      CentOS 7
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2020-03-17
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Fixed a bug introduced in 6.13.0 where the mode for "lastrunreport" file was reset and not honoured to what was defined in puppet.conf.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.13.0
      Puppet Server Version: 6.7.1
      OS Name/Version: CentOS Linux release 7.7.1908 (Core)

       

      We just attempted to upgrade puppet agent from 6.8.1 to 6.13.0 and found that after the upgrade the file permissions on the "lastrunreport" file were reset and not honored to what was defined in our puppet.conf:

      Example:

      [agent]
        lastrunreport = /var/tmp/puppet/last_run_report.yaml { mode = 0664 }
        lastrunfile = /var/tmp/puppet/last_run_summary.yaml { mode = 0664 }

       

      Desired Behavior:

      Permissions should match what's defined in puppet.conf:

       

      $ ls -lah
      total 856K
      drwxr-xr-x. 2 root root 61 Feb 28 21:20 .
      drwxrwxrwt. 6 root root 4.0K Feb 28 14:32 ..
      -rw-rw-r--. 1 root root 848K Feb 28 21:20 last_run_report.yaml
      -rw-rw-r--. 1 root root 1.7K Feb 28 21:20 last_run_summary.yaml
      $
      

      Both files have a mode of 664

       

       

      Actual Behavior:

      In reality, after the upgrade the file permissions will be correct if the puppet service is restarted... But after a manual, or scheduled run (by the service daemon) the file permissions will be incorrect:

      $ ls -lah
      total 856K
      drwxr-xr-x. 2 root root   61 Feb 28 21:20 .
      drwxrwxrwt. 6 root root 4.0K Feb 28 14:32 ..
      -rw-rw----. 1 root root 848K Feb 28 21:20 last_run_report.yaml
      -rw-rw-r--. 1 root root 1.7K Feb 28 21:20 last_run_summary.yaml
      $
      

      Notice that last_run_report.yaml has a mode of 660 when it should be 664

       

       

        Attachments

          Activity

            People

            Assignee:
            gheorghe.popescu Gheorghe Popescu
            Reporter:
            jbehrends Josh Behrends
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support