Bug #7490
openForeman does not check for Environment match when assigning Host to HostGroup
Description
You can assign a Host to a HostGroup where the environment on each is different. When the Puppet agent runs, it ignores the configuration from the HostGroup.
Example:
1. Ensure that a class (e.g. puppetlabs-ntp) is in the 'development' environment and NOT in the 'production' environment.
2. Create a HostGroup in the 'development' environment. Assign the class from Step 1 to it, and optionally provide configuration details.
3. Create a new Host in the 'production' environment, and assign the HostGroup created in step 2 to the new host.
4. Run the puppet agent on the new Host.
Expected Results
================
An error is displayed at step 3, saying that the HostGroup is not compatible.
Actual Results
==============
No error is displayed. No software is installed by the puppet agent when it runs.
Updated by Dominic Cleal almost 10 years ago
- Category set to Puppet integration
- Status changed from New to Feedback
This behaviour's by design now, with the introduction of config groups the behaviour was changed as they were fairly hard to use with the proposed (and 1.4 default) behaviour.
http://theforeman.org/manuals/1.5/index.html#3.6Upgrade notes that 1.5 removed the "remove_classes_not_in_environment" and changed the effective behaviour from "false" to "true", meaning that classes that a host had assigned (e.g. via config groups or a host group) are removed automatically from the class list rather than being passed to Puppet, which would throw an error as the class wasn't found.
Updated by Neil Greenwood almost 10 years ago
I think this is not a good user experience.
I think that an error/warning message when assigning the host group to the host would be a much better experience, rather than an in-depth investigation about why Foreman/Puppet is not doing what I think I've asked it to do.
Updated by Dominic Cleal almost 10 years ago
- Related to Bug #5105: default Setting['remove_classes_not_in_environment'] to true and have class_selection partial show/hide inherited classes from parent based on this setting added
Updated by Dominic Cleal almost 10 years ago
- Status changed from Feedback to New
Updated by Dominic Cleal over 8 years ago
- Has duplicate Feature #14717: Classes assigned to a parent hostgroup that are not avaliable to a given host should be indicated in the WebUI added