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

Log resident configuration upon daemon launch

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      Users can confirm Puppet agent's resident configuration state when running as a daemon.

      Show
      Users can confirm Puppet agent's resident configuration state when running as a daemon.
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      PR - 2019-07-23, NW - 2019-08-07, NW - 2019-08-21, NW - 2019-09-03, NW - 2019-09-18
    • CS Priority:
      Reviewed
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      This change is intended to log on debug level the configuration
      used on startup when running in daemon mode (by default daemon mode can be enabled on POSIX systems and is disabled on Windows)

      Log will sent to the output configured with --logdest

      Configuration will be reloaded and also logged on SIGHUP
      Show
      This change is intended to log on debug level the configuration used on startup when running in daemon mode (by default daemon mode can be enabled on POSIX systems and is disabled on Windows) Log will sent to the output configured with --logdest Configuration will be reloaded and also logged on SIGHUP
    • QA Risk Assessment:
      Needs Assessment

      Description

      Problem Statement

      When attempting to diagnose issues with configuration drift within Puppet agent itself (such as changes to `puppet.conf` not picked up by the agent), there is no way to confirm that the resident configuration is the same as the current state of the configuration files.

      For example, we can confirm configuration file settings with puppet config print and lookup PE keys with puppet lookup, but these only reflect what's currently written to the filesystem—if the daemon launched with different settings, there's no equivalent command to confirm its resident configuration.

      Suggested Improvement

      Either at info or debug logging levels, dump the configuration used by the daemon on launch and also when the daemon reloads the configuration.

      Use cases

      • User Dougie wants to change a setting on disk (for instance, in puppet.conf or in PE Hiera keys) that doesn't have an obvious measurable impact, but he still wants to confirm that the change is picked up by the daemon after it is restarted. (For instance, Dougie might want to confirm that changing a setting in puppet.conf takes effect if the setting also exists in Hiera or the classifier.) If the daemon dumps its settings on launch with debug-level logging enabled, Dougie could confirm that the daemon's new settings match the settings on disk.
      • User Dougie launches the agent daemon, then user Bob changes the agent settings on disk. The agent daemon then runs uninterrupted for a length of time. Dougie is concerned that the setting on disk might have been changed, and if so wants to revert the change. However, he cannot remember the altered setting's original value. If the daemon dumped its settings on launch at info log level, Dougie could confirm that the settings on disk were changed and revert them to their original value.
      • User Dougie launches the agent daemon, then user Bob changes the agent settings on disk. The agent daemon then runs uninterrupted for a length of time. The agent eventually exhibits signs of a potential issue related to an agent setting, and Dougie calls Support. Using the settings that Bob set on disk, Support cannot reproduce the problem. It also does not appear that the daemon reloaded the settings from disk. Dougie does not remember how the settings Bob changed were configured when the running daemon was launched. If the daemon dumped its settings on launch at info log level, Support could confirm the settings in use by the daemon and attempt to reproduce the issue.

        Attachments

          Activity

            People

            • Assignee:
              ciprian.badescu Ciprian Badescu
              Reporter:
              garrett.guillotte Garrett Guillotte
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support