Project

General

Profile

Actions

Bug #31674

closed

Expired token should be renewed on downloading host boot disks

Added by Lukas Zapletal over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

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 by lzap:

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).

Actions #1

Updated by Marek Hulán about 3 years ago

Could we just modify the expiration of the existing token? That way we don't have to regenerate it at all and don't have to fight with build mode. I know we potentially prolong the token for other images too, but still, the token is valid for the host that's apparentely about to be built.

Actions #2

Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominik Matoulek
  • Pull request https://github.com/theforeman/foreman_bootdisk/pull/106 added
Actions #3

Updated by Dominik Matoulek almost 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF