Project

General

Profile

Bug #7407

Cloning a hostgroup do not clone Puppet classes and parameters

Added by Anthony Lapenna about 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host groups
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

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 issues

Related to Foreman - Feature #3085: Request to be able to clone host groups via APIClosed2013-09-13
Related to Foreman - Bug #2785: clone method in managed.rb causes infinite loopClosed2013-07-14
Related to Foreman - Bug #8521: Host clone should include associated Puppet classesClosed2014-11-26
Related to Foreman - Bug #9274: Config Groups not carried over when cloning a Host GroupClosed2015-02-06

Associated revisions

Revision 7691ab4a (diff)
Added by Tom Caspy over 6 years ago

fixes #7407 - puppet class parameters should be cloned in #clone

Revision 74b7f660 (diff)
Added by Tom Caspy over 6 years ago

fixes #7407 - puppet class parameters should be cloned in #clone

(cherry picked from commit 7691ab4a56a49118f6cf97ca7f6de1c932b99e2a)

History

#1 Updated by Dominic Cleal about 7 years ago

  • Related to Feature #3085: Request to be able to clone host groups via API added

#2 Updated by Dominic Cleal about 7 years ago

  • Related to Bug #2785: clone method in managed.rb causes infinite loop added

#3 Updated by Anthony Lapenna about 7 years ago

Also found in 1.6.0. When cloning a hostgroup, it seems to only clone the Puppet classes/configuration groups of the parent.

#4 Updated by Anthony Lapenna almost 7 years ago

Still present in 1.6.1

#5 Updated by Dominic Cleal almost 7 years ago

  • Related to Bug #8521: Host clone should include associated Puppet classes added

#6 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #9274: Config Groups not carried over when cloning a Host Group added

#7 Updated by Dominic Cleal over 6 years ago

  • Category set to Host groups
  • Status changed from New to Assigned
  • Assignee set to Tom Caspy

#8 Updated by The Foreman Bot over 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2159 added
  • Pull request deleted ()

#9 Updated by Tom Caspy over 6 years ago

don't think this is an actual bug in current develop, added tests to make sure it keeps working.

#10 Updated by Dominic Cleal over 6 years ago

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.

#11 Updated by Tom Caspy over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#12 Updated by Dominic Cleal over 6 years ago

  • Legacy Backlogs Release (now unused) set to 28

#13 Updated by Anthony Lapenna over 6 years ago

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

#14 Updated by Anthony Lapenna over 6 years ago

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