[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:
Relates
Template:
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.

 Description   

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.



 Comments   
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 Dec 07 22:30:16 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.