Bug 1187520

Summary: [RFE] IDM snippet not expanded when reviewing provisioning template
Product: Red Hat Satellite Reporter: David Juran <djuran>
Component: Content ManagementAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.6CC: bbuckingham, bkearney, cwelton, djuran, kbidarka, lzap, stbenjam
Target Milestone: UnspecifiedKeywords: FutureFeature, Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14528
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.26-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:11:56 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: 1139277    

Description David Juran 2015-01-30 10:40:29 UTC
Description of problem:
If one reviews the provisioning template of a client enrolled in IPA through the REALM proxy, the IDM snippet which enrolls the host can't be seen.

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

How reproducible:
Every time

Steps to Reproduce:
1. Hosts -> All hosts -> <select a host>
2. Templates -> review provisioning template
3. Do note that the Identity Management Registration Snippet is missing


Additional info:

now try pressing the button "enable rebuild on next host boot" and then fetch http://sat6.rhcdev.acme.net/unattended/provision?token=bbc364a5-3a1f-4ccc-91fc-bb5f14dd95be
Do note that this kickstart file _does_ include the  Identity Management Registration Snippet

Comment 1 RHEL Program Management 2015-01-30 10:54:34 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Stephen Benjamin 2015-03-19 13:21:55 UTC

*** This bug has been marked as a duplicate of bug 1202993 ***

Comment 4 Stephen Benjamin 2015-03-19 13:24:48 UTC
Oops, sorry, not a dupe - misread it.

The snippet is only shown when there's a one-time password is available, and the one-time password is only set in IdM at the very last second: when the provisioning template is requested from the host itself.

You will not see it in a preview.

IMHO, this is most likely not a bug. 

You can confirm the snippet is rendered by viewing the anaconda-ks.cfg on the host after provisioning.

Comment 5 Stephen Benjamin 2015-03-19 13:26:08 UTC
Actually, you do see the snippet in the rendered template with the token, so closing this as its working as intended.

Comment 6 Lukas Zapletal 2015-03-25 15:31:33 UTC
We could show the preview tho even in non-build mode giving token some dummy value. Could be useful.

Comment 7 David Juran 2015-03-25 16:53:52 UTC
Re-opening this bug as an RFE, it's certainly useful to be able to preview the entire expanded template and at least I find the current behavior confusing.

Comment 8 Stephen Benjamin 2015-03-26 08:06:15 UTC
You could temporarily set @host.otp to some nonsense value during preview and the snippet would render, but I think that's more confusing as it could give the user the impression that the OTP orchestration happened and that value is valid.

Comment 9 Stephen Benjamin 2015-11-04 17:41:29 UTC
Created redmine issue http://projects.theforeman.org/issues/12396 from this bug

Comment 10 Bryan Kearney 2015-11-19 15:00:43 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12396 has been closed

Comment 12 Stephen Benjamin 2016-03-16 17:21:21 UTC
You don't need to waste time tasting this, please mark it FailedQA and send it back to me, only Foreman templates got this change. Katello (and Satellite) won't get it without some changes too.

Comment 13 Stephen Benjamin 2016-03-24 17:03:42 UTC
Taking out of ON_QA, fails on Sat 6.2 snaps without this being added to the Katello template.

Comment 18 Bryan Kearney 2016-04-07 14:01:19 UTC
Upstream bug component is Content Management

Comment 19 Bryan Kearney 2016-04-12 04:01:15 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14528 has been closed
-------------
Stephen Benjamin
Applied in changeset commit:katello|fca1d834a0d8252aa28cc1f7f715dc1d2f5a44d4.

Comment 21 Kedar Bidarkar 2016-05-31 16:47:53 UTC
IDM snippet is now expanded successfully when reviewing provisioning templates.

VERIFIED with sat62-snap(GA)-13.1

Comment 22 Bryan Kearney 2016-07-27 11:11:56 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/RHBA-2016:1501