Skip to content

fix: handle pqrpm GPG keys on Azure and add HA RHUI cert mapping - #619

Merged
sshmulev merged 1 commit into
mainfrom
fix/azure-rhel98-gpg-rhui
Sep 16, 2026
Merged

sshmulev merged 1 commit into
mainfrom
fix/azure-rhel98-gpg-rhui

Conversation

@sshmulev

@sshmulev sshmulev commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • test_number_gpg_keys: On RHEL 9.8+ Azure, all GPG keys are in the pqrpm db (/usr/lib/pqrpm/lib/sysimage/rpm), so the default rpmdb has 0 keys. Added has_pqrpm detection after existing OCI branches to expect 0 keys on non-OCI clouds that use pqrpm.
  • test_number_gpg_keys: Fixed check_outputhost.run().stdout for debug print (prevents crash when grep finds 0 keys) and rpm -qrpm -qa in assertion (prevents false count of 1 when no keys are installed).
  • test_azure.py: Added -ha suffix to source_suffixes dict so HA images correctly resolve to content-ha.crt instead of failing to find the RHUI certificate.

Test plan

  • Run CIV against RHEL 9.8 Azure HA image — test_rhui_certificate_date should pass
  • Run CIV against RHEL 9.8 Azure images — test_number_gpg_keys should pass (expects 0 keys in default rpmdb)
  • Verify OCI tests are unaffected — test_pqrpm_gpg_keys and OCI branches in test_number_gpg_keys unchanged

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>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@sshmulev
sshmulev merged commit c1c8390 into main Sep 16, 2026
4 checks passed
@sshmulev
sshmulev deleted the fix/azure-rhel98-gpg-rhui branch September 16, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant