Reprovisioning a host using new HostGroup does not inherit root password from the new HostGroup
Description of problem:
Rebuilding/reprovisioning a host using a new HostGroup does not inherit all the values from the new HostGroup
Steps to Reproduce:
1. Provision a new host using a HostGroup(i.e ABC).
2. update the same host with a new HostGroup (i.e XYZ).
3. Then rebuild the same host
Root password set for the reprovisioned host is from the first HostGroup(i.e ABC)
As the Host is updated with the new HostGroup (i.e XYZ). so all the parameters should be inherited from the new HostGroup (i.e XYZ)
I just notied the password field, there could be more values that are getting inherited from the first HostGroup(i.e ABC).
Fixes #33811 - Inheritance of root password for Hosts
Hostgroups are used for handle and easily modify passwords for Hosts. But prior this change we stored the password on create time to the Host even if it was inherited from Hostgroup.
When you've changed Hostgroup for Host, the root password was intanct and thus it used password from the old Hostgroup.
This change it so the password is stored on the Host only if it is set directly, otherwise it's stored on the Hostgroup and always read from there.
This also fixes the issue, that the password was returned unencrypted if it was comming from global setting.
#1 Updated by Dominik Matoulek about 1 year ago
- Triaged changed from No to Yes
- Assignee set to Dominik Matoulek
- Subject changed from Reprovisioning a host using new HostGroup does not inherit root password from the new HostGroup to Reprovisioning a host using new HostGroup does not inherit root password from the new HostGroup