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

noop metaparam on defined ignored inside of classes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 5.5.12, PUP 6.12.0
    • Fix Version/s: None
    • Component/s: Catalog Application
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 5.5.12 and 6.12.0
      Puppet Server Version: n/a
      OS Name/Version: n/a

      In specific situations the noop metaparameter is ignored.

      define testop {
        notify{$name: }
      }
       
      class test {
        testop { 'foo':
          noop => true,
        }
      }
       
      include test
       
      testop { 'nop':
        noop => true,
      }
      

      Desired Behavior:

      Neither Notify[foo] and Notify[nop] are not executed

      Actual Behavior:

      david@davids:~/git/puppetlabs-accounts$ bundle exec puppet apply test.pp 
      Notice: Compiled catalog for localhost in environment production in 0.03 seconds
      Notice: foo
      Notice: /Stage[main]/Test/Testop[foo]/Notify[foo]/message: defined 'message' as 'foo'
      Notice: /Stage[main]/Main/Testop[nop]/Notify[nop]/message: current_value 'absent', should be 'nop' (noop)
      Notice: Testop[nop]: Would have triggered 'refresh' from 1 event
      Notice: Class[Main]: Would have triggered 'refresh' from 1 event
      Notice: Applied catalog in 0.03 seconds
      david@davids:~/git/puppetlabs-accounts$
      

      This violates user expectations in a dangerous way.

      Thanks to Borja Rubio for originally reporting this on the community slack.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              david.schmitt David Schmitt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support