Bug #17648

Attribute inheritance is not propagated correctly in UI/API workflows

Added by Shimon Shtein 7 months ago. Updated 6 months ago.

Status:Closed
Priority:Normal
Assigned To:Shimon Shtein
Category:-
Target version:Foreman - Team Ivan Iteration 7
Difficulty: Pull request:https://github.com/theforeman/foreman_discovery/pull/316
Bugzilla link:
Story points-
Velocity based estimate-

Description

update method does not invoke #apply_inherited_attributes on the newly created host.

hg1.png (49.8 KB) Preview Jason Nance, 12/20/2016 01:40 PM

hg2.png (24.7 KB) Preview Jason Nance, 12/20/2016 01:40 PM

host.png (47.2 KB) Preview Jason Nance, 12/20/2016 01:40 PM

Hg1 Hg2 Host

Related issues

Related to Discovery - Refactor #14316: Host group fails to auto fill puppet ca & master in disco... New 03/22/2016
Related to Discovery - Bug #18106: Discovery v8 provisioning throws ActiveModel::ForbiddenAt... Closed 01/17/2017

Associated revisions

Revision 044cd42f
Added by Shimon Shtein 6 months ago

Fixes #17648 - Added support for attributes inheritance

Changed HostConverter.to_managed to automatically call attribute
inheritance mechanism when a new set of attributes is introduced.

History

#1 Updated by Lukas Zapletal 7 months ago

  • Subject changed from PUT /discovered_hosts/:id is not inheriting attributes from selected hostgroup to Attribute inheritance is not propagated correctly in UI/API workflows

So after some chat it looks like we are not calling apply_inherited_attributes properly from API and also from UI (we call it in edit but not in update).

#2 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/316 added

#3 Updated by Lukas Zapletal 7 months ago

  • Related to Refactor #14316: Host group fails to auto fill puppet ca & master in discovery provisioning added

#4 Updated by Jason Nance 6 months ago

I believe this same issue exists with the realm as well. Please see attached screen shots for example. If I'm talking about something different let me know and I'll open a new bug.

In short, inherited Puppet CA, Puppet Master, and Realm are showing up in the host group but not on a newly created host.

#5 Updated by Shimon Shtein 6 months ago

It should all be solved by this fix.
All inherited attributes are manged by those two methods: #apply_inherited_attributes and #set_hostgroup_defaults that are added by this PR.

Let us know, if it's not solving your case.

#6 Updated by Shimon Shtein 6 months ago

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

#7 Updated by Simone Caldana 5 months ago

  • Related to Bug #18106: Discovery v8 provisioning throws ActiveModel::ForbiddenAttributesError when Katello is installed added

Also available in: Atom PDF