Jira (PUP-9181) Notify resource behaves in unexpected fashion

1 view
Skip to first unread message

Gerhardus Geldenhuis (JIRA)

unread,
Sep 26, 2018, 9:38:04 AM9/26/18
to puppe...@googlegroups.com
Gerhardus Geldenhuis created an issue
 
Puppet / Improvement PUP-9181
Notify resource behaves in unexpected fashion
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2018/09/26 6:37 AM
Priority: Normal Normal
Reporter: Gerhardus Geldenhuis

The following code:
notify { 'BOOLEAN FACT TRUE':
  message => true,
}
 
notify { 'BOOLEAN FACT FALSE':
  message => false,
}

gives the following output when running puppet apply:

Notice: Compiled catalog for controlmagent.local in environment production in 0.02 seconds
Notice: true
Notice: /Stage[main]/Main/Notify[BOOLEAN FACT TRUE]/message: defined 'message' as true
Notice: Applied catalog in 0.01 seconds

The expectation is that the BOOLEAN FACT FALSE resource should also show up. Instead it appears that notify resource treats false as a special case to not include the resource or to not show it.

This is potentially fine but then this behaviour needs to be better documented. The current documentation does not capture this behaviour. https://puppet.com/docs/puppet/5.5/types/notify.html
This is also true for 6.0 but I have not tested the behaviour in 6.0 yet.

Tested on 5.5.6

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

Henrik Lindberg (JIRA)

unread,
Sep 26, 2018, 11:02:04 AM9/26/18
to puppe...@googlegroups.com
Henrik Lindberg commented on Improvement PUP-9181
 
Re: Notify resource behaves in unexpected fashion

The behavior is the same on Puppet 6.0.0.

Henrik Lindberg (JIRA)

unread,
Sep 26, 2018, 11:29:04 AM9/26/18
to puppe...@googlegroups.com

The catalog looks ok - there is a Notify with a false message so the issue occurs when applying that catalog.

Henrik Lindberg (JIRA)

unread,
Sep 26, 2018, 11:42:04 AM9/26/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Change By: Henrik Lindberg
Component/s: Types and Providers

Josh Cooper (JIRA)

unread,
Mar 29, 2019, 1:12:03 PM3/29/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Coremunity

Josh Cooper (JIRA)

unread,
Jun 19, 2019, 2:30:05 PM6/19/19
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-9181
 
Re: Notify resource behaves in unexpected fashion

This is a bug in the resource harness whereby it doesn't allow the desired value (aka Property#should) for a property to be falsey due to:

if param.should && !param.safe_insync?(current_value)

This is a duplicate of PUP-2368, closing

Reply all
Reply to author
Forward
0 new messages