Bug #7407
closed
Cloning a hostgroup do not clone Puppet classes and parameters
Added by Anthony Lapenna over 10 years ago.
Updated over 6 years ago.
Description
Hello,
I've tried to clone a hostgroup with an assigned set of configuration groups, Puppet classes and parameters.
However, the freshly created hostgroup has cloned only the fields Environment, Puppet CA and Puppetmaster. No puppet classes/parameters.
- Related to Feature #3085: Request to be able to clone host groups via API added
- Related to Bug #2785: clone method in managed.rb causes infinite loop added
Also found in 1.6.0. When cloning a hostgroup, it seems to only clone the Puppet classes/configuration groups of the parent.
- Related to Bug #8521: Host clone should include associated Puppet classes added
- Related to Bug #9274: Config Groups not carried over when cloning a Host Group added
- Category set to Host groups
- Status changed from New to Assigned
- Assignee set to Tom Caspy
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2159 added
- Pull request deleted (
)
don't think this is an actual bug in current develop, added tests to make sure it keeps working.
It doesn't look like Puppet class parameter overrides (lookup values) are copied in either host group or host cloning, which is part of this bug report.
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 28
Works partially in 1.8.1, example:
1. Clone a hostgroup with a config group included.
2. In the Puppet classes pane, the config group is included but the classes in contains are not included
3. In the Parameters pane, the overriden parameters are not cloned
Another issue in 1.8.1 (dunno if it a normal behaviour):
1. Clone a hostgroup
2. Check that Puppetclasses and parameters are cloned: OK
3. Change the parent hostgroup
4. Check the overriden parameters: every overriden parameter has been lost
I've been able to clone a hostgroup by using the following procedure to avoid the loss of any overriden parameters:
1. Clone a hostgroup
2. Add a suffix to the hostgroup name to avoid the duplicate group definition (such as "-2")
3. Validate the hostgroup cloning
4. Update the newly created hostgroup
5. Remove the prefix and update the parent hostgroup
Also available in: Atom
PDF