Bug 1257833 - Disabling token_duration disables ks template substitution
Disabling token_duration disables ks template substitution
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning Templates (Show other bugs)
Unspecified
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 04:10 EDT by Chris Jenkins
Modified: 2016-10-07 13:24 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-07 13:24:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11602 None None None 2016-04-22 12:13 EDT

  None (edit)
Description Chris Jenkins 2015-08-28 04:10:57 EDT
Description of problem: When using capsules, setting the token_duration to "0" stops the ks=<capsule> in the PXE template being set and reverts to ks=<satellite server> 


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


How reproducible:
Every time.

Steps to Reproduce:
1. Create a capsule and set subnet, domain and location. Capsule requires "Templates" option.
2. Create a new host using the subnet associated to the capsule & subnet
3. Check  /var/lib/tftboot/pxelinux.cfg/<mac addr> on the capsule

Actual results:
default linux
label linux
kernel boot/RedHat-7.1-x86_64-vmlinuz
append initrd=boot/RedHat-7.1-x86_64-initrd.img ks=http://<satellite Server>:80/unattended/provision network ks.sendmac
IPAPPEND 2


Expected results:
default linux
label linux
kernel boot/RedHat-7.1-x86_64-vmlinuz
append initrd=boot/RedHat-7.1-x86_64-initrd.img ks=http://<capsule servre>:8000/unattended/provision?token=42e3c2e3-3841-44ab-a65a-c2dddfdff16f network ks.sendmac
IPAPPEND 2
Comment 1 Lukas Zapletal 2015-08-28 10:18:24 EDT
Triage notes: Template proxying cannot work without tokens. Instead silently falling back to direct connection, we could raise an error.
Comment 2 Bryan Kearney 2015-08-28 13:33:41 EDT
Created redmine issue http://projects.theforeman.org/issues/11602 from this bug
Comment 5 Ohad Levy 2016-02-22 02:50:43 EST
I would not like to support token less installation in general, and in particular on capsules. the token is a unique way of identifying the host, regardless of ip address / mac address (e.g. which NIC used to boot it) etc. all the other alternative/legacy options have their own quirks.

the token duration is configurable (e.g. if the use wish to create a nearly fixed tokens that is possible) however its usually hidden from the user, and I would like to understand the root cause of why disabling tokens.

however, afaiu, in https://github.com/theforeman/smart-proxy/commit/38a0935152a0cc6f04c3843b8258866b2b96e0ad lukas added a way to proxy the additional information required to identify the requesting host, in which case, this might be already solved in 6.2

adding needinfo for lzap to confirm, and needinfo or reported to explain more of what is the usage case for turning off tokens.

thanks!
Comment 6 Lukas Zapletal 2016-02-23 08:21:39 EST
Yes, that should fix the issue (Satellite 6.2).
Comment 7 Brad Buckingham 2016-04-01 11:40:52 EDT
Hi Lukas,

Can you provide some verification steps for QE based upon the changes referenced in comment 5?  Thanks!
Comment 8 Lukas Zapletal 2016-04-04 04:14:15 EDT
Sure thing,

so the process is simple, setup provisioning with Capsule templating (without direct connection to Satellite - make sure to block all the communication) and also set token_duration to zero in global settings. Then provision a bare-metal or VM host which installs via Anaconda (e.g. not image-based provisioning).
Comment 9 Bryan Kearney 2016-10-07 13:24:32 EDT
Based on Comment 8, I am marking this as closed for 6.2 If you are seeing issues with this, please feel free to re-open with additional information.

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