Bug 1257833

Summary: Disabling token_duration disables ks template substitution
Product: Red Hat Satellite Reporter: Chris Jenkins <cjenkins>
Component: Provisioning TemplatesAssignee: Lukas Zapletal <lzap>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: bbuckingham, bkearney, cjenkins, cwelton, dmoessne, lzap, ohadlevy, sauchter
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/11602
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-07 17:24:32 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:

Description Chris Jenkins 2015-08-28 08:10:57 UTC
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 14:18:24 UTC
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 17:33:41 UTC
Created redmine issue http://projects.theforeman.org/issues/11602 from this bug

Comment 5 Ohad Levy 2016-02-22 07:50:43 UTC
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 13:21:39 UTC
Yes, that should fix the issue (Satellite 6.2).

Comment 7 Brad Buckingham 2016-04-01 15:40:52 UTC
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 08:14:15 UTC
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 17:24:32 UTC
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.