Bug 1721899 - Provisionoing a VM on GCE creating two Host Profiles in foreman
Summary: Provisionoing a VM on GCE creating two Host Profiles in foreman
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources - GCE
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
urgent vote
Target Milestone: 6.6.0
Assignee: Kavita
QA Contact: Jitendra Yejare
Depends On:
Blocks: 1721890
TreeView+ depends on / blocked
Reported: 2019-06-19 08:45 UTC by Jitendra Yejare
Modified: 2019-08-12 19:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-07-10 05:20:57 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 27158 None None None 2019-06-26 07:43:01 UTC

Description Jitendra Yejare 2019-06-19 08:45:08 UTC
Provisioning a VM on GCE CR is creating two host profiles in foreman.
The one is along with domain which we have provided while provisioning and another is with the actual domain appends from GCE.

Like :
1. testgceHost.domain-from-foreman
2. testgceHost.domain-from-foreman.us-east1-gce-internal

1. Create GCE CR
2. Create a domain in foreman
3. Provision a VM on GCE CR and assign the domain created while provisioning

Actual Behavior:
Two host profiles are created in foreman instead of one for a provisioned VM  on GCE as described in the description of this bug.

Expected Behavior:
Single host profiles should be created in foreman for a provisioned VM  on GCE.

Comment 3 Kavita 2019-06-26 07:42:59 UTC
Created redmine issue https://projects.theforeman.org/issues/27158 from this bug

Comment 4 Kavita 2019-07-10 05:20:57 UTC
When I tried to reproduce this issue on latest foreman, found below observations.

There is a setting called "Use UUID for certificates" which says "Satellite will use random UUIDs for certificate signing instead of hostnames".
In case of google compute resource, it is recommended to enable this setting for consistent Puppet certificate IDs instead of hostnames.

Upstream documentation link - https://theforeman.org/manuals/1.22/index.html#5.2.4GoogleComputeEngineNotes

By observation is that if this setting is disabled(by default it is) and user tries to provision a system with puppet integration using google compute resource,
it creates two host profiles. One which is already created while provisioning & other one is when facts from provisioned system are collected to the server. 
The reason behind this is because of hostnames are different.

With this setting, it will not create two host profiles. so closing this BZ.

Note You need to log in before you can comment on or make changes to this bug.