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

[RHELC-1033, RHELC-1036] Alma and Rocky Linux 8: Fix subscription-manager not being installed #905

Merged

Conversation

bocekm
Copy link
Member

@bocekm bocekm commented Sep 7, 2023

If the python3-syspurpose package is installed on the system prior to the conversion, it has a different NEVRA than subscription-manager requires. The subscription-manager is strict about it - the syspurpose VRA (version, release, arch) needs to match exactly the sub-man VRA. And because we're downloading the sub-man packages from UBI, the VRA doesn't match.

Previously we thought this issue affects just CentOS Linux 8 but it does affect Alma and Rocky 8 as well.

Follows-up on #869.

If the python3-syspurpose package is installed on the system prior to
the conversion, it has a different NEVRA than subscription-manager
requires. The subscription-manager is strict about it - the syspurpose
NEVRA needs to match exactly the sub-man NEVRA. And because we're
downloading the sub-man packages from UBI, the NEVRA doesn't match.

Previously we thought this issue affects just CentOS Linux 8 but it does
affect Alma and Rocky 8 as well.
@bocekm bocekm requested a review from abadger September 7, 2023 16:25
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a9313cf) 94.10% compared to head (749898e) 94.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #905   +/-   ##
=======================================
  Coverage   94.10%   94.10%           
=======================================
  Files          41       41           
  Lines        4142     4142           
  Branches      737      737           
=======================================
  Hits         3898     3898           
  Misses        173      173           
  Partials       71       71           
Flag Coverage Δ
centos-linux-7 89.47% <100.00%> (ø)
centos-linux-8 90.05% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
convert2rhel/subscription.py 90.48% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@abadger abadger left a comment

Choose a reason for hiding this comment

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

Works for me.

The only drawback if this captures too many distros is that on rollback, the system could have the python-syspurpose and json-c packages from UBI instead of (an older version) from the original vendor.

@bocekm bocekm added kind/bug-fix A bug has been fixed tests/all Run the full test suite. Equivalent to `/packit test`. labels Sep 7, 2023
@has-bot
Copy link
Member

has-bot commented Sep 7, 2023

/packit test


@oamg/conversions-qe please review results and provide ack.

@bocekm
Copy link
Member Author

bocekm commented Sep 7, 2023

I've manually verified it works on Alma 8.8 and OL 8.latest (8.8).
Alma 8.8 had python3-syspurpose and json-c pre-installed and both got downloaded and updated together with installation of sub-man.
OL 8.latest had json-c pre-installed and it got downloaded and updated together with installation of sub-man.

@abadger abadger merged commit 5488aa6 into oamg:main Sep 7, 2023
32 of 34 checks passed
@Venefilyn Venefilyn changed the title Fix sub-man installation on Alma and Rocky 8 Alma and Rocky Linux 8: Fix subscription-manager not being installed Sep 8, 2023
@Venefilyn Venefilyn changed the title Alma and Rocky Linux 8: Fix subscription-manager not being installed [RHELC-1033, RHELC-1036] Alma and Rocky Linux 8: Fix subscription-manager not being installed Sep 8, 2023
@Venefilyn Venefilyn mentioned this pull request Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix A bug has been fixed tests/all Run the full test suite. Equivalent to `/packit test`.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants