fix: handle pqrpm GPG keys on Azure and add HA RHUI cert mapping - #619
Merged
Merged
Conversation
On RHEL 9.8+ Azure, all GPG keys are in the pqrpm db — the default rpmdb has 0 keys. Detect this with has_pqrpm and expect 0. Also fix two bugs in test_number_gpg_keys: - check_output crashes when grep finds nothing (exit 1); use host.run() - rpm -q outputs "not installed" (1 line) when no keys; use rpm -qa Add '-ha' to source_suffixes so HA images resolve to content-ha.crt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
/usr/lib/pqrpm/lib/sysimage/rpm), so the default rpmdb has 0 keys. Addedhas_pqrpmdetection after existing OCI branches to expect 0 keys on non-OCI clouds that use pqrpm.check_output→host.run().stdoutfor debug print (prevents crash when grep finds 0 keys) andrpm -q→rpm -qain assertion (prevents false count of 1 when no keys are installed).-hasuffix tosource_suffixesdict so HA images correctly resolve tocontent-ha.crtinstead of failing to find the RHUI certificate.Test plan
test_rhui_certificate_dateshould passtest_number_gpg_keysshould pass (expects 0 keys in default rpmdb)test_pqrpm_gpg_keysand OCI branches intest_number_gpg_keysunchanged