[PUP-5522] Puppet node does not keep attributes consistent with parameters Created: 2015/11/19  Updated: 2016/01/22  Resolved: 2015/12/04

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 3.8.5, PUP 4.3.2

Type: Bug Priority: Normal
Reporter: Thomas Hallgren Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Story Points: 1
Sprint: Language 2015-12-02, Language 2015-12-16
Release Notes: Bug Fix
Release Notes Summary: Some Puppet related applications (and advanced use cases using puppet from Ruby) could end up with a Node object that used one environment but reported it was in another. The observable wrong behavior in those cases would be that the node could end up with the wrong set of parameters. This problem has not been observed for regular catalog compilation.


The Puppet::Node class has two attributes, environment_name and environment. It also has a parameter named 'environment'. These are not kept in sync which causes problems for the catalog_preview application. See PRE-81. I think it's better to fix this in the puppet code than adding a workaround in the catalog preview program.

Comment by Thomas Hallgren [ 2015/11/19 ]

The only possible validation for this fix is the use case described in PRE-81.

Comment by Henrik Lindberg [ 2015/12/01 ]

merged to 3.x at 62ad5eb

Comment by Henrik Lindberg [ 2015/12/01 ]

merged 3x to stable, and stable to master

Comment by Henrik Lindberg [ 2016/01/22 ]

This fix causes problems in rspec_puppet. See https://github.com/rodjek/rspec-puppet/pull/354 for a fix for another problem i rpsec_puppet's cachig. Liks from there to a travis rspec run reveals that something unexpected (by rspec_puppet) is happening with catalog_ids of catalogs it keeps in the cache.

Generated at Sat Jul 11 02:14:43 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.