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

"Unable to set ownership" error with logdest on agents

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      When running Puppet as root with a log file specified as the log destination, ownership of the log file is set as root:root and 0640 permissions.

      Show
      When running Puppet as root with a log file specified as the log destination, ownership of the log file is set as root:root and 0640 permissions.
    • Epic Link:
    • Team:
      Coremunity
    • Sprint:
      Client 2016-09-07, Platform Core KANBAN
    • Method Found:
      Customer Feedback
    • CS Priority:
      Minor
    • CS Frequency:
      1 - 1-5% of Customers
    • CS Severity:
      1 - Superficial
    • CS Business Value:
      1 - ?
    • CS Impact:
      Customers will see error message and be alarmed by it, even tho it has no impact on the agent functionality.
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Puppet will only set the user, group, and mode of log files if Puppet creates them.

      Description

      Customer has noted that after installing a 2016.2 agent and setting up logdest via /etc/sysconfig/puppet:

      PUPPET_EXTRA_OPTS=--logdest=/var/log/puppetlabs/puppet/puppet.log
      

      The log shows the error:

      2016-07-07 07:51:55 -0700 Puppet (err): Unable to set ownership to puppet:puppet for log file: /var/log/puppetlabs/puppet/puppet.log
      

      This is caused by the fact that even though the new AIO agent no longer creates the puppet user and group, the log destination code still refers to them at https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/log/destinations.rb#L95-L102. On a master, this code is fine, since the default puppet user "pe-puppet" is created, but on an agent they default to "puppet" which is not.

      Either the AIO agent RPM needs to have the creation of the puppet user and group added back to the pre-install script as it was in Puppet 3.x, or logic needs to be added to the destinations.rb to not run on agents where the user does not exist to prevent the error.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  kris.bosland Kris Bosland
                  Reporter:
                  adam.bottchen Adam Bottchen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  12 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: