Bug #3086
closedImport puppet classes fails to update classes
Description
Some modules have been updated and some parameters were added and some removed. Clicking 'import classes' shows the updated classes in the right environment, but after import nothing changes and there are no errors in any logs to say why this did not occur. This is on Foreman 1.2.2 under RHEL6.
The classes are in use and unfortunately we cannot test by removing the host groups from the class prior to updating the class, so I am unsure if this is a requirement.
Updated by Kal Aeolian about 11 years ago
After lots of debug I've realized its adding parameters but not removing them. This affects Foreman 1.3 also. It seems to be a logic error.
in puppet_class_importer in the remove_parameter() definition there is a bit of logic -
if key && key_in_env && !key.override?
The problem is that parameterized classes without a default setting automatically are set to require an override, even if you haven't set any overrides. And besides, if I'm removing the parameter I don't care if there is an override, I want it removed.
Update is a different story but for removes the '!key.override?' should be removed from code.
Updated by Dominic Cleal about 9 years ago
- Is duplicate of Bug #7517: Puppet class parameter not removed from environment after an import added
Updated by Dominic Cleal about 9 years ago
- Status changed from New to Duplicate
Thanks, seems your suggestion was missed. #7517 addresses this now.