Bug #33811
Reprovisioning a host using new HostGroup does not inherit root password from the new HostGroup
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1982745
Description of problem:
Rebuilding/reprovisioning a host using a new HostGroup does not inherit all the values from the new HostGroup
How reproducible:
100%
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
Actual results:
Root password set for the reprovisioned host is from the first HostGroup(i.e ABC)
Expected results:
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)
Additional info:
I just notied the password field, there could be more values that are getting inherited from the first HostGroup(i.e ABC).
Related issues
Associated revisions
History
#1
Updated by Dominik Matoulek 7 months 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
#2
Updated by The Foreman Bot 7 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8887 added
#3
Updated by The Foreman Bot 6 months ago
- Fixed in Releases 3.2.0 added
#4
Updated by Anonymous 6 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|60d53c2621b3537e61e9082428ebb585f02fd3bc.
#5
Updated by Ondřej Ezr 4 months ago
- Related to Bug #33732: The default password in settings is not encoded added
#6
Updated by Ondřej Ezr 4 months ago
- Related to Refactor #34289: Remove workaround for root_password encoding added
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.