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

Global noop true should override resource noop=>false

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 2.7.23, PUP 4.2.3
    • Fix Version/s: None
    • Component/s: Catalog Application
    • Labels:
      None
    • Template:
    • CS Priority:
      Reviewed

      Description

      Running Puppet agent with --noop will make changes if a resource has noop => false set.

      This is entirely unintuitive. If I run Puppet with --noop, I definitely don't want it to make changes. I understand that pluginsync will run, and resources will be exported, but actually making changes seems particularly dangerous.

      What's worse is that this typically affects resources that are critical. If I'm explicitly managing noop for a resource, then it's a resource that could potentially break things if it were turned on, and it's something that I want to keep an eye on during everyday runs.

      If I'm getting ready to disable noop on that resource, and I've made any other changes, I'm going to run the agent with --noop to verify what it will do.

      For example, the code that bit me was:

      resources { 'user':
        purge              => true,
        noop               => ! $::profile::server::params::user_purge,
        unless_system_user => true,
        # Solaris uses high UIDs for system users:
        unless_uid         => range(60000,65535),
      }
      

      I'm aware of the clientnoop fact; that code now uses:

      noop => $facts['clientnoop'] or ! $::profile::server::params::user_purge,
      

      There is an ancient, closed RedMine issue covering this: https://projects.puppetlabs.com/issues/20679 (assigned to Eric Sorenson)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              daniel.parks Daniel Parks
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support