Unable to override hostgroup parameters from All hosts => edit host on WebUI
Description of problem:
when we click on "edit host" from all hosts. edit page showing the default settings with respect to the selected hostgroup. Any change in the parameters does not reflect on WebUI. However, hammer shows updated details.
Steps to Reproduce:
1. provision a host with hostgroup
2. change the LE/CV or content-source from WebUI and save it
3. click on edit host again and LE/CV changed to the default one in the hostgroup
- edit page showing values from hostgroup after changing
- changes should be visible on WebUI
- hammer host info shows correct values
- only reproducible in 6.3
- reproducer details added
Fixes #23706 - CV/LE show the right value on Host form
Before this patch, the following situation could happen:
1. Host A is part of a Host Group 'test'. Host A inherits LE/CV 'test'
coming from Host Group 'test'
2. We decide to change the LE/CV of Host A to 'production', either
through the API or the UI.
3. The next time we decide to check the UI, the helper was wrong (this
patch fixes it) and showed the LE/CV from the Host Group 'test'. This is
very confusing and may even cause you to change the LE/CV to from
'production' to 'test' by accident.
Refs #23706 - Show correct content source
This is basically the same bug we had with CV/LE:
1. Create a host group 'test' with a content source
2. Assign host group 'test' to a host 'A'
3. Clear the content source, or change the content source of 'A'
4. Submit 'A'
5. Edit 'A'
Result: on the UI, 'A' content source will still be the content source
coming from the host group. If you check the API, the host content
source is correct - the one you assigned in step 3.
Expected Result: on the UI, 'A' content source is the one set on step 3