Bug 1879035

Summary: expired token should be renewed on downloading host boot disks
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Bootdisk PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED WONTFIX QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: low    
Version: 6.8.0CC: lzap
Target Milestone: 6.9.0Keywords: EasyFix, Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-19 10:34:05 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 Roman Plevka 2020-09-15 09:18:55 UTC
Description of problem:
When a provisioning token for a host is expired, downloading a bootdisk for the host effectively generates an outdated image (with the invalid token) and thus making the images useless.

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


Steps to Reproduce:
1. create a host record
2. [optionally shorten the token validity time]
3. wait for the token to expire
4. generate a full host image
5. try to boot it

Actual results:
kickstart file is unable to retrieve as the old, invalid token is used

Expected results:
Downloading of the bootdisk should involce re-generating a provisioning token
Ideally, there should be a warning dialog with an option to confirm the refreshing of the token.
This would save the effort of generating and downloading of an useless image.

Additional info:

Comment 2 Lukas Zapletal 2020-09-17 07:01:16 UTC
There is one problem tho - to generate token, host must be in build mode. And download action shoud NOT turn on build mode, because if user accidentally does this and reboot, the host can get reprovisioned if PXE is setup correctly. Data loss. Therefore we MUST error out instead of generating new token asking the user to enter build mode (which creates a new token).

Comment 3 Lukas Zapletal 2021-01-19 10:34:05 UTC
Minor issue, I don't have the capacity to work on this one. I created an upstream bug for this: https://projects.theforeman.org/issues/31673 - feel free to reopen if needed.

Comment 4 Lukas Zapletal 2021-01-19 10:34:29 UTC
Correction, upstream bug: https://projects.theforeman.org/issues/31674