Bug #2369
openParamaterized classes persist through import after parameters have been removed
Description
I recently tried a module from the puppet forge (for bacula)
The module included some paramaterized classes. When I importe the environment, the classes were imported correctly.
Upon reviewing the module, I decided I din't care for it, and decided to write my own.
The new module didn't use any paramaterized classes. However, even when re-importing the environment puppet would error out. It complained about things that were defined as paramaterized values.
The only way I was able to work around it was to move my module out of the puppet directory, import the env (where foreman cleaned up everything) then move my new module back and re-import the environment.
Steps to reproduce:
#1) Install a module with paramaterized classes
#2) Import environments
#3) Set a few of the paramaters (I set them globally. I assume it'd work at the hostgroup, domain, or host level as well)
#4) Remove the module with paramaterized classes
#5) Replace with a module using the same class names, but without them being paramaterized.
#6) Import environments
#7) Initiate a puppet run
I did not look at the hosts YAML output. I suspect that the resulting yaml file is still putting the paramaterized bits in play.
Updated by Dominic Cleal over 11 years ago
- Subject changed from paramaterized classes can persist in odd instances to Paramaterized classes persist through import after parameters have been removed
- Assignee deleted (
Ohad Levy)
Updated by Dominic Cleal almost 10 years ago
- Has duplicate Bug #6859: Foreman not removing old class parameters added
Updated by Dominic Cleal almost 10 years ago
- Related to Bug #7517: Puppet class parameter not removed from environment after an import added
Updated by Jeff Sault over 9 years ago
This is turning into a big problem for us. With our deployments we tend to have different versions of the same class in different environments.
Whenever we remove a parameter from a new version of a class, puppet complains that an unknown parameter is being passed to the class.
Ive been working on implementing workarounds using the foreman API but its a nightmare...
- It seems its not possible to remove a smart class parameter from a class for a specific environment, its all or nothing, the parameter gets removed from all instances of the class, in all environments.
- If the class is removed from the environment then re-imported (as described above) then all the previously overridden parameters are orphaned. They show in the host/hostgroup parameters pages but the class field is empty. Theres no way that I can find to find these parameters via the API to re-associate them with the classes.
Are there any other workaround which I havent thought of? Or plans to fix the issue?
Updated by Dominic Cleal over 9 years ago
- Related to Bug #10377: Re-importing an environment where class parameters were removed does not remove those parameters in Foreman's class signatures added
Updated by Dominic Cleal over 8 years ago
- Related to Bug #12579: Class Parameters are not separated for different environments added
Updated by Dominic Cleal over 8 years ago
- Related to deleted (Bug #10377: Re-importing an environment where class parameters were removed does not remove those parameters in Foreman's class signatures)
Updated by Dominic Cleal over 8 years ago
- Related to deleted (Bug #12579: Class Parameters are not separated for different environments)
Updated by Chris Edester over 7 years ago
This issue seems related:
I can find no way to delete Smart class parameters.
After deleting all of my Puppet classes, all the orphaned Smart class parameters are left with no Puppet class association. Is there any way to purge the left over Smart class parameters? Shoudn't they be deleted with their respective Puppet classes?