Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PE-39411) Add descriptive error during infrastructure upgrade when rbac token is invalid #514

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

jhbuchanan45
Copy link
Contributor

@jhbuchanan45 jhbuchanan45 commented Oct 10, 2024

Summary

The upgrade plan now checks if the token used to upgrade compilers is valid before beginning the upgrade process. This is accomplished using a validate_rbac_token task

Closes #340

Starting: plan peadm::upgrade
Starting: task peadm::validate_rbac_token on direct-blitz.delivery.puppetlabs.net
Finished: task peadm::validate_rbac_token with 1 failure in 6.3 sec
Finished: plan peadm::upgrade in 6.46 sec
Failed on direct-blitz.delivery.puppetlabs.net:
  The task failed with exit code 1
  403 puppetlabs.rbac/token-revoked: 
  Check your API token at /root/.puppetlabs/token. An alternate token file can be specified using the token_file param. 
  
  See https://www.puppet.com/docs/pe/latest/rbac_token_auth_intro for more details. 
Failed on 1 target: direct-blitz.delivery.puppetlabs.net

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.

Changes include test coverage?

  • Yes
  • Not needed

Have you updated the documentation?

  • Yes, I've updated the appropriate docs
  • Not needed

@jhbuchanan45 jhbuchanan45 requested review from a team as code owners October 10, 2024 10:21
@jhbuchanan45 jhbuchanan45 marked this pull request as draft October 10, 2024 10:24
…e_rbac_token task to check if a given token file is valid
@jhbuchanan45 jhbuchanan45 force-pushed the PE-39411-peadm-check-for-a-valid-rbac-token branch from a781b83 to b9170ef Compare October 10, 2024 14:48
@jhbuchanan45 jhbuchanan45 marked this pull request as ready for review October 10, 2024 15:56
@jhbuchanan45 jhbuchanan45 requested a review from ragingra October 14, 2024 11:56
@jhbuchanan45 jhbuchanan45 merged commit 63fc086 into main Oct 15, 2024
70 checks passed
@jhbuchanan45 jhbuchanan45 deleted the PE-39411-peadm-check-for-a-valid-rbac-token branch October 15, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check for a valid RBAC token
2 participants