Jira (PUP-5751) Setting enc paramater environment seems to corrupt the internal environment paramater.

2 views
Skip to first unread message

Jason A. Smith (JIRA)

unread,
Jan 25, 2016, 3:46:03 PM1/25/16
to puppe...@googlegroups.com
Jason A. Smith created an issue
 
Puppet / Bug PUP-5751
Setting enc paramater environment seems to corrupt the internal environment paramater.
Issue Type: Bug Bug
Affects Versions: PUP 3.8.5
Assignee: Unassigned
Components: Language
Created: 2016/01/25 12:45 PM
Environment:

Testing an upgrade from 3.8.4 to 3.8.5 with a puppet master and custom ENC script.

Priority: Normal Normal
Reporter: Jason A. Smith

We have been using Puppet for several years, back when Puppet was not setting a top-scope environment parameter, so our custom ENC script would to this. When testing the latest 3.8.5 version of Puppet, we discovered that when the ENC was setting this top-scope environment parameter, it would appear to corrupt it somehow. It could still be used in templates and strings, but if it was used in a logical expression, like:

if ($::environment == 'production') {
  ...
}

it would fail to match the string comparison. I tested it with the type3x() function from stdlib and it was an unknown type. Since this is new in 3.8.5, I assume it has something to do with the change made in

PUP-5522 . Since puppet now sets the environment parameter I will remove it from our ENC script, but since just setting an environment parameter in the ENC source data now seems to corrupt it, I thought I should still report this as a bug.
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
May 16, 2017, 9:38:02 AM5/16/17
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug PUP-5751
 
Re: Setting enc paramater environment seems to corrupt the internal environment paramater.

Needs a reproducer for 4.x
As noted here (https://docs.puppet.com/puppet/4.10/nodes_external.html#environment) if there is the need to set the environment from a value in the ENC return, it is a separate entry and not at all another parameter.

When testing this, there should be validation that environment is not given as a parameter with a value from the ENC. That would give a clearer error message.

This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
May 16, 2017, 9:39:03 AM5/16/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
May 25, 2017, 1:26:08 PM5/25/17
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Mar 16, 2018, 4:30:03 PM3/16/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

unread,
Oct 3, 2020, 12:37:04 AM10/3/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-5751
 
Re: Setting enc paramater environment seems to corrupt the internal environment paramater.

This hasn’t had an update in 3+ years so I’m going to close it. Please reopen if this is still an issue

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages