Jira (PUP-10301) noop metaparam on defined ignored inside of classes

5 views
Skip to first unread message

David Schmitt (JIRA)

unread,
Feb 19, 2020, 7:39:05 AM2/19/20
to puppe...@googlegroups.com
David Schmitt created an issue
 
Puppet / Bug PUP-10301
noop metaparam on defined ignored inside of classes
Issue Type: Bug Bug
Assignee: Unassigned
Components: Catalog Application
Created: 2020/02/19 4:38 AM
Priority: Normal Normal
Reporter: David Schmitt

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.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

David Schmitt (JIRA)

unread,
Feb 19, 2020, 8:15:06 AM2/19/20
to puppe...@googlegroups.com
David Schmitt updated an issue
Change By: David Schmitt
Affects Version/s: PUP 5.5.12
Affects Version/s: PUP 6.12.0

Josh Cooper (JIRA)

unread,
Feb 19, 2020, 3:52:06 PM2/19/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10301
 
Re: noop metaparam on defined ignored inside of classes

I believe the issue with Notify[foo] is a dup of PUP-3630. See Charlie Sharpsteen's repro in https://tickets.puppetlabs.com/browse/PUP-3630?focusedCommentId=119272&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-119272. Please confirm and close this as a duplicate, or provide more context about what it's different.

The second resource Notify[nop] correctly applies the noop as indicated by the output message:

Notice: /Stage[main]/Main/Testop[nop]/Notify[nop]/message: current_value 'absent', should be 'nop' (noop)

Reply all
Reply to author
Forward
0 new messages