fix: honor PULL_SECRET env var in firmware refval collection - #139
Merged
butler54 merged 1 commit intoSep 1, 2026
Merged
Conversation
collect-firmware-refvals.sh hardcoded ~/pull-secret.json and only accepted an override via --pull-secret. rhdp/wrapper.sh and the Makefile's collect-*-refvals targets called it without forwarding a pull secret override, so veritas authenticated against the wrong or stale credentials whenever the OpenShift pull secret used to define the cluster (via PULL_SECRET / rhdp-cluster-define.py) lived somewhere other than ~/pull-secret.json -- despite rhdp/README.md already documenting PULL_SECRET as applying automatically to all wrapper scripts. - collect-firmware-refvals.sh now defaults PULL_SECRET from the environment (PULL_SECRET:-~/pull-secret.json), matching the precedence already used by rhdp-cluster-define.py's resolve_pull_secret(). --pull-secret still takes precedence when passed explicitly, so 'make collect-azure-refvals PULL_SECRET=...' and a plain exported PULL_SECRET both work with no other changes. - rhdp/wrapper.sh now explicitly forwards --pull-secret to the refval collection step, alongside its other explicit credential checks. - Updated README.md, docs/firmware-reference-values.md, and the script's own --help/error text to document the PULL_SECRET override.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
rhdp/wrapper.shfor an Azure deployment resulted in a veritasauthentication failure during the "retrieving PCR measurements" step,
even though cluster provisioning (which also needs a pull secret)
succeeded.
scripts/collect-firmware-refvals.shhardcodes its pull secret defaultto
~/pull-secret.jsonand only accepts an override via the-p/--pull-secretCLI flag — it does not honor aPULL_SECRETenvironment variable.
rhdp/wrapper.shand theMakefile'scollect-firmware-refvals/collect-azure-refvalstargets both invokethe script without forwarding a pull secret override.
Meanwhile,
rhdp/rhdp-cluster-define.py(used to provision the clusteritself) does support
--pull-secret/ thePULL_SECRETenv var, andrhdp/README.mdalready documentsPULL_SECRETas applyingautomatically "to all three wrapper scripts without any extra flags" —
which was not actually true for reference-value collection.
Net effect: whenever the pull secret used to define the cluster (via
PULL_SECRET) lives somewhere other than~/pull-secret.json, veritassilently authenticates with the wrong/stale credentials and fails.
Fix
scripts/collect-firmware-refvals.sh: defaultPULL_SECRETfrom theenvironment (
${PULL_SECRET:-${HOME}/pull-secret.json}), matching theprecedence already used by
rhdp-cluster-define.py'sresolve_pull_secret().-p/--pull-secretstill takes precedence whenpassed explicitly.
rhdp/wrapper.sh: explicitly forward--pull-secretto the refvalcollection step, alongside the script's other explicit credential
checks (
GUID,CLIENT_ID, etc.).README.md,docs/firmware-reference-values.md, and thescript's own
--help/error text to document thePULL_SECREToverride.
Testing
This also fixes the plain Makefile path, which previously had no way to
pass a pull secret override at all:
Verified locally:
bash -nsyntax check on both modified scripts--helpoutput renders correctly after the header-comment line shift${PULL_SECRET:-${HOME}/pull-secret.json}precedence behaves asexpected with and without the env var set, and
-p/--pull-secretstill overrides both
Verification pending on the APAC lab jump host / RHDP Azure environment
where the original failure was observed (full
rhdp/wrapper.shrun andmake collect-azure-refvalswithPULL_SECRETset to a non-defaultpath).