Bug #3551

Foreman removes all puppet classes from a hostgroup when the environment is changed.

Added by Jim Bailey almost 4 years ago. Updated 7 months ago.

Status:Closed
Priority:Normal
Assigned To:Sebastian Gräßl
Category:Puppet integration
Target version:Team Daniel - Iteration 9
Difficulty: Bugzilla link:1158991
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4048
Story points-
Velocity based estimate-
Release1.15.0Release relationshipAuto

Description

When changing the environment for a hostgroup, puppet removes all classes.


Related issues

Related to Foreman - Bug #18045: Puppet classes don't show up without hostgroups Closed 01/12/2017
Related to Foreman - Bug #18427: Hostgroups don't have any puppet classes (or are removed ... Resolved 02/08/2017

Associated revisions

Revision 915ee077
Added by Sebastian Gräßl 8 months ago

Fixes #3551 - Show unavailable Puppet Classes in Host Group edit

Puppet Classes can be assigned to a Host Group even if they are
not available in the set environment.

The Classes persist through out changes of the environment,
but were previously hidden from the UI this changes that.

Unavailable Puppet Classes are now shown in the UI as greyed out
and a warning is displayed to inform the user about them.

History

#1 Updated by Dominic Cleal almost 3 years ago

  • Category set to Puppet integration

#2 Updated by Dominic Cleal almost 3 years ago

  • Bugzilla link set to 1158991

#3 Updated by Sebastian Gräßl 11 months ago

The circumstances under which this occurs are when a class are not available in the environment the `HostGroup` will be changed to.
If the target environment does have the class available it will be kept. This does not happen instantly (anymore) but requires the form to be submitted.

Since Foreman does not create classes in puppet, but only reflect what is in puppet, keeping the classes in host groups as they are could lead to confusion, if they are not actually in the current environment. Keeping them, and marking them as "unavailable" if the environment does not include it and allow to remove them manually.

A simpler approach would be to simple warn in case classes are not available and will be purged on submit.

Thoughts on which route would be the more feasible way to go?

#4 Updated by Marek Hulán 11 months ago

I prefer warning about purging on submit.

#5 Updated by Sebastian Gräßl 11 months ago

  • Assigned To set to Sebastian Gräßl

#6 Updated by Marek Hulán 11 months ago

  • Target version set to Team Marek Iteration 6

#7 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4048 added

#8 Updated by Tomáš Strachota 10 months ago

  • Target version deleted (Team Marek Iteration 6)

#9 Updated by Daniel Lobato Garcia 9 months ago

  • Target version set to Team Daniel - iteration 8

#10 Updated by Anonymous 8 months ago

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

#11 Updated by Dominic Cleal 8 months ago

  • Release set to 1.15.0

#12 Updated by Dominic Cleal 8 months ago

  • Related to Bug #18045: Puppet classes don't show up without hostgroups added

#13 Updated by Daniel Lobato Garcia 8 months ago

  • Target version changed from Team Daniel - iteration 8 to Team Brad - Iteration 11

#14 Updated by Dominic Cleal 7 months ago

  • Related to Bug #18427: Hostgroups don't have any puppet classes (or are removed upon editing a hostgroup) added

#15 Updated by Brad Buckingham 7 months ago

  • Target version deleted (Team Brad - Iteration 11)

#16 Updated by Daniel Lobato Garcia 7 months ago

  • Target version set to Team Daniel - Iteration 9

Also available in: Atom PDF