Project

General

Profile

Actions

Bug #3086

closed

Import puppet classes fails to update classes

Added by Kal Aeolian about 11 years ago. Updated almost 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Puppet integration
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #7517: Puppet class parameter not removed from environment after an importClosedDominic Cleal09/18/2014Actions
Actions #1

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.

Actions #2

Updated by Ohad Levy about 11 years ago

  • Assignee set to Amos Benari
Actions #3

Updated by Ohad Levy about 10 years ago

  • Assignee deleted (Amos Benari)
Actions #4

Updated by Dominic Cleal almost 9 years ago

  • Is duplicate of Bug #7517: Puppet class parameter not removed from environment after an import added
Actions #5

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Duplicate

Thanks, seems your suggestion was missed. #7517 addresses this now.

Actions

Also available in: Atom PDF