Bug 1392620

Summary: HOST[OTP] is not correctly rendered in user-data
Product: Red Hat Satellite Reporter: Maxim Burgerhout <mburgerh>
Component: RealmAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.3CC: ajambhul, alejandro.cortina2, jcallaha, mmccune, mtenheuv, sghai, smercurio, stbenjam, svigan, vgunasek, zhunting
Target Milestone: 6.6.0Keywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: foreman-1.22.0-0.5.RC2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:52:26 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 Maxim Burgerhout 2016-11-07 22:08:10 UTC
Description of problem:
If I integrate with IdM in RHEL 7, and use a user-data template to configure my system, my system is not enrolled in IdM. I end up with this in my user-data (on my new machine)

/usr/sbin/ipa-client-install -w '$HOST[OTP]' --realm=REDHAT.LAB -U $idm_mkhomedir $idm_opts $idm_server $idm_ssh

and thus with an error

Nov  7 16:33:52 localhost cloud-init: Successfully retrieved CA cert
Nov  7 16:33:52 localhost cloud-init: Subject:     CN=Certificate Authority,O=REE
Nov  7 16:33:52 localhost cloud-init: Issuer:      CN=Certificate Authority,O=REE
Nov  7 16:33:52 localhost cloud-init: Valid From:  Tue Sep 06 13:01:52 2016 UTC
Nov  7 16:33:52 localhost cloud-init: Valid Until: Sat Sep 06 13:01:52 2036 UTC
Nov  7 16:33:52 localhost cloud-init: Joining realm failed: Incorrect password.
Nov  7 16:33:52 localhost cloud-init: Installation failed. Rolling back changes.
Nov  7 16:33:52 localhost cloud-init: IPA client is not configured on this systee

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

How reproducible:

Steps to Reproduce:
1. Create new image, configure for user-data
2. Configure Satellite for idm integration (follow docs :))
3. Create new host

Actual results:
See the above error, system listed not enrolled in idm (so satellite actually did create the object in idm)

Expected results:
system is enrolled, i can log in

Additional info:

Comment 1 Maxim Burgerhout 2016-11-07 22:29:54 UTC
Seems to be http://projects.theforeman.org/issues/10119

Comment 9 Bryan Kearney 2018-09-04 18:05:54 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.

Comment 10 Alex 2018-09-19 08:32:51 UTC
Hi there,

This bug has been fixed on https://github.com/theforeman/foreman/pull/5542

Comment 17 Stephen Wadeley 2019-10-02 09:21:14 UTC
I noticed this issue while testing:

Bug 1746775 - When deploying host by image based provisioning wrong kind of template is shown to be resolved

Comment 18 Bryan Kearney 2019-10-22 19:52:26 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.