Cannot update host and hostgroup overrides
I upgraded Foreman 1.9.0 to 1.9.1 this morning, and found that I cannot update a parameter override from the host or hostgroup screen. It fails silently and looks like it succeeded, but if you go back into the host or hostgroup, you will find that no change has been made. I must go to the class and change the parameter override value from there. Then it works. I also noticed that when I click the x to remove an override, the override button does not re-appear next to the original parameter.
This bug was introduced in 1.9.1. I tested on 1.9.0, and it worked as expected.
How to reproduce:
On 1.9.1 Foreman, add a class with a parameter override to a hostgroup. Edit the hostgroup and override the parameter. Submit. Edit the hostgroup and alter the overridden parameter. Submit. Edit the hostgroup again and notice that the second edit did not take. This works the same via a host override.
Updated by Alejandro Falcon about 8 years ago
Hi, I found this issue yesterday with a hash type parameter and applied this patch to fix it but suddenly started seeing another issue, the content changed to this weird format when overriding in the host edit page:
--- ! "environments:\r\n- test1\r\nenvironment_properties:\r\n test1:\r\n sites:\r\n
\ - test1\r\n site_properties:\r\n test1:\r\n hostname: test1.foo\r\n
\ logon2ssl_requirements:\r\n jkmanager:\r\n - all\r\n ssl_requirements:\r\n
\ jkmanager:\r\n - god\r\n workers:\r\n - name: test\r\n
\ host: 192.168.1.1\r\n switchboard:\r\n hostname: test.foo"
- name: test
However, the value appear to be fine in the externalhosts yaml page. If the override is done in the class page this wont happen. I'm not sure if the issue was actually introduced with this fix because the host page overrides were not working previously.