Bug 1679481

Summary: Discovery taxonomy broken due to regression in puppet importer
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: FactAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: tstrych
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: ehelms, jhutar, lzap, mhulan, tstrych
Target Milestone: 6.5.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.20.1.14-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1710884 (view as bug list) Environment:
Last Closed: 2019-05-14 12:40:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1710884    

Description Lukas Zapletal 2019-02-21 08:40:55 UTC
Puppet importer taxonomy code (set_taxonomies) is causing problems for discovery, this is a regression in Satellite 6.4 and 6.5. This is the timeline:

- Bug in older version of Satellite
- Fix in Foreman 1.14 (Satellite 6.3)
- Regression in Foreman 1.17 (Satellite 6.4)
- Fix no. 2 merged for Foreman 1.22

More details in the upstream tickets.

REL-ENG:

There are two changes:

- Foreman core - small oneliner, only cherry pick the set_taxonomies line, the other one is not relevant (must be actually not picked).
- Foreman discovery - four lines and tests

This is important bug for discovery and must be fixed in both 6.5 and 6.4. One-liner, zero risk. Do you want me to clone into 6.4 as well? Thanks.

Comment 4 Lukas Zapletal 2019-02-21 09:47:27 UTC
REL-ENGS:

Since discovery patch only include test changes, let's only merge the core patch.

https://projects.theforeman.org/issues/26038

QA:

- Create OrgA and OrgB with labels set as "OrgA" and "OrgB"
- Create subnet which has both organizations assigned.
- Set Organization Fact in Admister-Settings-Puppet to "xxx_org"
- Discover host in the subnet with custom facts:
- xxx_org set to OrgB
- discovery_organization set to OrgA
- Check the taxonomy of the discovered host

SUCCESS: It was discovered in OrgA

FAILURE: It was discovered in OrgB

Comment 10 tstrych 2019-03-19 13:28:17 UTC
Thanks for reproduce steps (comment #4).

Steps reproduced with sat-6.5.0 - snap 18, 
package version: foreman-1.20.1.10-1, 
Where host was discovered in OrgB and was not discovered with OrgA,

And then steps were reproduced again with sat-6.5.0 - snap 20,
package version: foreman-1.20.1.22-1,
Where host was discovered in OrgA, and was not discovered with OrgB.
These results are same as expected results in comment #4.

Verified

Comment 11 tstrych 2019-03-19 13:47:27 UTC
Additional info, as discovery image I used this /usr/share/foreman-discovery-image/foreman-discovery-image-3.5.4-2.iso

Comment 13 errata-xmlrpc 2019-05-14 12:40:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222