Feature #28071
openLet Hammer edit not storable hosts
Description
Problem:
At some point hammer can’t edit a host, e.g. changing the puppet environment. This happens when a change of a host cannot be safed because parameters went missing.
Example:
A new minor release of Debian is available. The host is updated, puppet is running after the update and collects the new os version information. Foreman takes this information and itself updates the host with this new information.
When the new os version has not been configured by now in foreman, meaning configure partition table, bootloader and mirror, then these options will be unset at the host with the new os version.
Now the host can’t be edited anymore because you cannot save your changes without setting these options again. In the same way hammer now is also unable to edit a host.
We’re using hammer inside of Gitlab Pipelines to e.g. change a host back to our production environment and delete a merged branch from foreman. This stops working which ends in much manual work to clean up foreman and get it fixed.
The used command is:
hammer host update --id ${host_id} --environment production
Expected outcome:
When you’re in the host selection, mark a host and choose “change environment” then you’re able to change the puppet environment even when you can’t safe the changes made to a host. Hammer should behave the same way.
Foreman and Proxy versions:
foreman-cli-1.20.2-1.el7.noarch
foreman-1.20.2-1.el7.noarch
tfm-rubygem-foreman_hooks-0.3.15-1.fm1_20.el7.noarch
tfm-rubygem-puppetdb_foreman-5.0.0-1.fm1_20.el7.noarch
foreman-ovirt-1.20.2-1.el7.noarch
tfm-rubygem-foreman_dhcp_browser-0.0.8-3.fm1_20.el7.noarch
tfm-rubygem-foreman_column_view-0.4.0-3.fm1_20.el7.noarch
foreman-debug-1.20.2-1.el7.noarch
foreman-postgresql-1.20.2-1.el7.noarch
foreman-release-scl-7-2.el7.noarch
foreman-libvirt-1.20.2-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7.noarch
foreman-release-1.20.2-1.el7.noarch
foreman-compute-1.20.2-1.el7.noarch
Foreman and Proxy plugin versions:
tfm-rubygem-hammer_cli-0.15.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7.noarch
Other relevant data:
I checked the release notes from foreman 1.20.2 to 1.23.0 but couldn’t find a note that is related to this issue.