Bug 1693857

Summary: registration fails if puppet fact with dmi::system::uuid exists in foreman
Product: Red Hat Satellite Reporter: Lai <ltran>
Component: RegistrationAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: jsherril, zhunting
Target Milestone: ReleasedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.10.0.40-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 19:58:01 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:

Description Lai 2019-03-28 19:44:14 UTC
Description of problem:
Registering a capsule with the activation key causes an error.

Version-Release number of selected component (if applicable):
6.5.0 snap 21


Steps to Reproduce:
1. Provision a capsule server
2. Host -> Content Hosts -> Register Content Host
3. Run the install for the pre-built bootstrap RPM from Register Content Host instruction on capsule
4. Content -> Activation Key -> Create Activation Key
5. Fill out info and submit
6. Run activation key commands on capsule

Actual results:
PG::DatatypeMismatch: ERROR:  argument of AND must be type boolean, not type integer
LINE 1: ...s.eng.bos.redhat.com' OR (fact_values.fact_name_id = 448,592
                                                                    ^
: SELECT  1 AS one FROM "hosts" LEFT OUTER JOIN "fact_values" ON "fact_values"."host_id" = "hosts"."id" WHERE "hosts"."type" IN ('Host::Managed') AND (hosts.name = 'dell-per720xd-01.rhts.eng.bos.redhat.com' OR (fact_values.fact_name_id = 448,592
		AND fact_values.value = '4C4C4544-0034-4D10-8047-C7C04F483032')) LIMIT $1


Expected results:
Successfully register content host

Additional info:
This may be caused by custom puppet fact of 'dmi::system::uuid'

Comment 3 Brad Buckingham 2019-04-01 13:54:21 UTC
Description from upstream issue (26480):

Steps to reproduce:

1. create a puppet fact with the name of 'dmi::system::uuid'
2. PuppetFactName.create(:name => 'dmi::system::uuid' )
3. try to register a system with sub-man

Comment 6 Bryan Kearney 2019-04-01 20:04:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26480 has been resolved.

Comment 11 Bryan Kearney 2019-05-14 19:58:01 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