Project

General

Profile

Bug #11807

Cannot update host and hostgroup overrides

Added by Anonymous over 3 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart Variables
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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.


Related issues

Related to Foreman - Bug #11095: Host(group) edit -> when adding/removing puppetclass the current status of the lookup values is saved to DBClosed2015-07-12
Has duplicate Foreman - Bug #11899: Foreman not updating puppet class overrides from Hostgroup viewDuplicate2015-09-21

Associated revisions

Revision 8fd3c579 (diff)
Added by Dominic Cleal over 3 years ago

fixes #11807 - update existing lookup value when changed from nested host form

Revision 375d8840 (diff)
Added by Dominic Cleal over 3 years ago

refs #11807 - change nested lookup_values destroy test params to match UI

Revision 829a9130 (diff)
Added by Dominic Cleal over 3 years ago

fixes #11807 - update existing lookup value when changed from nested host form

(cherry picked from commit 8fd3c57986635e48b4b67ffb11e5bf3f97e5bab4)

Revision fe445c6d (diff)
Added by Dominic Cleal over 3 years ago

refs #11807 - change nested lookup_values destroy test params to match UI

(cherry picked from commit 375d8840faca1e49b79a5bd4fcc3cd9f4fe73dad)

Revision 3c5a8c04 (diff)
Added by Dominic Cleal over 3 years ago

refs #11807 - fix renamed factory

History

#1 Updated by Dominic Cleal over 3 years ago

  • Category set to Smart Variables
  • Legacy Backlogs Release (now unused) set to 88

#2 Updated by Daniel Lobato Garcia over 3 years ago

For the record, I've just tried to do this and I can confirm it doesn't
work for Puppet class parameter overrides. Updating host
parameters/overridden global parameters seems to work well.

#3 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #11095: Host(group) edit -> when adding/removing puppetclass the current status of the lookup values is saved to DB added

#4 Updated by Dominic Cleal over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#5 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2716 added
  • Pull request deleted ()

#6 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#7 Updated by Dominic Cleal over 3 years ago

  • Has duplicate Bug #11899: Foreman not updating puppet class overrides from Hostgroup view added

#8 Updated by Alejandro Falcon over 3 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"

Original value:

properties:
environments:
- test1
environment_properties:
test1:
sites:
- test1
site_properties:
test1:
hostname: test1.foo
logon2ssl_requirements:
jkmanager:
- all
ssl_requirements:
jkmanager:
- god
workers:
- name: test
host: 192.168.1.1
switchboard:
hostname: test.foo

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.

#9 Updated by Dominic Cleal over 3 years ago

Alejandro, that looks like #11375.

Also available in: Atom PDF