Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2118790 - Convert2rhel playbook tries to install RHEL8 convert2rhel package
Summary: Convert2rhel playbook tries to install RHEL8 convert2rhel package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible Collection
Version: 6.11.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.12.0
Assignee: Leos Stejskal
QA Contact: Griffin Sullivan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-16 18:58 UTC by Matthew Yee
Modified: 2022-11-16 13:35 UTC (History)
4 users (show)

Fixed In Version: ansible-collection-redhat-satellite-3.7.0-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman-ansible-modules pull 1467 0 None open BZ#2118790 - Convert2RHEL - Content views for activation keys 2022-08-30 07:54:57 UTC
Red Hat Issue Tracker SAT-12292 0 None None None 2022-08-18 14:33:09 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:25 UTC

Description Matthew Yee 2022-08-16 18:58:00 UTC
Description of problem:

-Run the convert2rhel playbook as a scheduled job.
-Job fails during installation of convert2rhel.

Version-Release number of selected component (if applicable):
6.11.1.1

How reproducible:
very

Steps to Reproduce:
1. Run the playbook. 
2.
3.

Centos version:
[root@ip-172-31-29-2 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Actual results:
1:
[DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names 
   2:
to new standard, use callbacks_enabled instead. This feature will be removed 
   3:
from ansible-core in version 2.15. Deprecation warnings can be disabled by 
   4:
setting deprecation_warnings=False in ansible.cfg.
   5:
[WARNING]: Callback disabled by environment. Disabling the Foreman callback
   6:
plugin.
   7:

   8:
PLAY [all] *********************************************************************
   9:

  10:
TASK [Gathering Facts] *********************************************************
  11:
ok: [ip-172-31-29-2.us-west-1.compute.internal]
  12:

  13:
TASK [Install convert2rhel] ****************************************************
  14:
fatal: [ip-172-31-29-2.us-west-1.compute.internal]: FAILED! => {"changed": false, "changes": {"installed": ["convert2rhel"]}, "msg": "Error: Package: convert2rhel-0.26-1.el8.noarch (Acme_Org_Convert2RHEL8_Convert2RHEL8_main)\n           Requires: dnf-utils\nError: Package: convert2rhel-0.26-1.el8.noarch (Acme_Org_Convert2RHEL8_Convert2RHEL8_main)\n           Requires: python3-six\nError: Package: convert2rhel-0.26-1.el8.noarch (Acme_Org_Convert2RHEL8_Convert2RHEL8_main)\n           Requires: python3-pexpect\n", "rc": 1, "results": ["Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-\n              : manager\nLoading mirror speeds from cached hostfile\n * base: download.cf.centos.org\n * extras: download.cf.centos.org\n * updates: download.cf.centos.org\nResolving Dependencies\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: dnf for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3 for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-setuptools for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package dnf.noarch 0:4.0.9.2-2.el7_9 will be installed\n--> Processing Dependency: python2-dnf = 4.0.9.2-2.el7_9 for package: dnf-4.0.9.2-2.el7_9.noarch\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: python3-pip for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package python2-dnf.noarch 0:4.0.9.2-2.el7_9 will be installed\n--> Processing Dependency: dnf-data = 4.0.9.2-2.el7_9 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-hawkey >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n---> Package python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed\n---> Package dnf-data.noarch 0:4.0.9.2-2.el7_9 will be installed\n--> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-2.el7_9.noarch\n---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed\n---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed\n---> Package python2-hawkey.x86_64 0:0.22.5-2.el7_9 will be installed\n--> Processing Dependency: libdnf(x86-64) = 0.22.5-2.el7_9 for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n---> Package python2-libcomps.x86_64 0:0.1.8-14.el7 will be installed\n--> Processing Dependency: libcomps(x86-64) = 0.1.8-14.el7 for package: python2-libcomps-0.1.8-14.el7.x86_64\n--> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-14.el7.x86_64\n---> Package python2-libdnf.x86_64 0:0.22.5-2.el7_9 will be installed\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package libcomps.x86_64 0:0.1.8-14.el7 will be installed\n---> Package libdnf.x86_64 0:0.22.5-2.el7_9 will be installed\n---> Package librepo.x86_64 0:1.8.1-8.el7_9 will be installed\n---> Package libreport-filesystem.x86_64 0:2.1.11-53.el7.centos will be installed\n---> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed\n--> Finished Dependency Resolution\n You could try using --skip-broken to work around the problem\n You could try running: rpm -Va --nofiles --nodigest\n"]}
  15:
PLAY RECAP *********************************************************************
  16:
ip-172-31-29-2.us-west-1.compute.internal : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
  17:
Exit status: 2

I can work around this problem with "subscription-manager repos --disable Acme_Org_Convert2RHEL8_Convert2RHEL8_main". 


Expected results:
The ansible playbook should be able to figure out which version of Centos it's running on.

Additional info:

Comment 1 Matthew Yee 2022-08-17 19:39:46 UTC
Need to remember to reboot the centos host after updating it. Closing the bz.

Comment 2 Matthew Yee 2022-08-17 21:08:56 UTC
I was too hasty in closing this. 

Here's what happens.

- install centos7
- update host
- reboot host so that new kernel is loaded
- register host to satellite with "CentOS 7 converting" host group
- run the "Convert to RHEL" job template
- error:

fatal: [ip-172-31-29-2.us-west-1.compute.internal]: FAILED! => {"changed": false, "changes": {"installed": ["convert2rhel"]}, "msg": "Error: Package: convert2rhel-0.26-1.el8.noarch (Acme_Org_Convert2RHEL8_Convert2RHEL8_main)\n           Requires: dnf-utils\nError: Package: convert2rhel-0.26-1.el8.noarch (Acme_Org_Convert2RHEL8_Convert2RHEL8_main)\n           Requires: python3-six\nError: Package: convert2rhel-0.26-1.el8.noarch (Acme_Org_Convert2RHEL8_Convert2RHEL8_main)\n           Requires: python3-pexpect\n", "rc": 1, "results": ["Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-\n              : manager\nLoading mirror speeds from cached hostfile\n * base: download.cf.centos.org\n * extras: download.cf.centos.org\n * updates: download.cf.centos.org\nResolving Dependencies\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: dnf for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3 for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-setuptools for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package dnf.noarch 0:4.0.9.2-2.el7_9 will be installed\n--> Processing Dependency: python2-dnf = 4.0.9.2-2.el7_9 for package: dnf-4.0.9.2-2.el7_9.noarch\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: python3-pip for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package python2-dnf.noarch 0:4.0.9.2-2.el7_9 will be installed\n--> Processing Dependency: dnf-data = 4.0.9.2-2.el7_9 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-hawkey >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n--> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-2.el7_9.noarch\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n---> Package python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed\n---> Package dnf-data.noarch 0:4.0.9.2-2.el7_9 will be installed\n--> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-2.el7_9.noarch\n---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed\n---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed\n---> Package python2-hawkey.x86_64 0:0.22.5-2.el7_9 will be installed\n--> Processing Dependency: libdnf(x86-64) = 0.22.5-2.el7_9 for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n--> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64\n---> Package python2-libcomps.x86_64 0:0.1.8-14.el7 will be installed\n--> Processing Dependency: libcomps(x86-64) = 0.1.8-14.el7 for package: python2-libcomps-0.1.8-14.el7.x86_64\n--> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-14.el7.x86_64\n---> Package python2-libdnf.x86_64 0:0.22.5-2.el7_9 will be installed\n--> Running transaction check\n---> Package convert2rhel.noarch 0:0.26-1.el8 will be installed\n--> Processing Dependency: dnf-utils for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-pexpect for package: convert2rhel-0.26-1.el8.noarch\n--> Processing Dependency: python3-six for package: convert2rhel-0.26-1.el8.noarch\n---> Package libcomps.x86_64 0:0.1.8-14.el7 will be installed\n---> Package libdnf.x86_64 0:0.22.5-2.el7_9 will be installed\n---> Package librepo.x86_64 0:1.8.1-8.el7_9 will be installed\n---> Package libreport-filesystem.x86_64 0:2.1.11-53.el7.centos will be installed\n---> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed\n--> Finished Dependency Resolution\n You could try using --skip-broken to work around the problem\n You could try running: rpm -Va --nofiles --nodigest\n"]}

To work around this, I disable the Convert2RHEL8 repo.

[root@ip-172-31-29-2 ~]# subscription-manager repos --list
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   Acme_Org_Convert2RHEL8_Convert2RHEL8_main
Repo Name: Convert2RHEL8 main
Repo URL:  https://ip-172-31-29-4.us-west-1.compute.internal/pulp/content/Acme_Org/Library/custom/Convert2RHEL8/Convert2
           RHEL8_main
Enabled:   1

Repo ID:   Acme_Org_Convert2RHEL7_Convert2RHEL7_main
Repo Name: Convert2RHEL7 main
Repo URL:  https://ip-172-31-29-4.us-west-1.compute.internal/pulp/content/Acme_Org/Library/custom/Convert2RHEL7/Convert2
           RHEL7_main
Enabled:   1

[root@ip-172-31-29-2 ~]# subscription-manager repos --disable Acme_Org_Convert2RHEL8_Convert2RHEL8_main
Repository 'Acme_Org_Convert2RHEL8_Convert2RHEL8_main' is disabled for this system.

Then I rerun the convert to rhel job and it runs successfully.

Comment 3 Matthew Yee 2022-08-17 22:04:22 UTC
A really quick fix for this is just to override the XXXX_Convert2RHEL8_Convert2RHEL8_main repository that's enabled to disabled in the convert2rhel_centos7 activation key.

Comment 4 Marek Hulan 2022-08-18 14:36:50 UTC
Yeah it seems the new repos are automatically enabled so the setup role should ensure that only the relevant version of convert2rhel repo is enabled. In other words, we need to set that override that Matthew mentioned in comment 3.

Comment 5 Evgeni Golov 2022-09-27 07:37:50 UTC
PR was merged

Comment 7 Griffin Sullivan 2022-10-10 16:38:22 UTC
Verified in 6.12 snap 14

Convert2RHEL enables the correct repository to run the conversion.

Steps to Reproduce:

1) Follow steps at https://www.redhat.com/en/blog/how-use-satellite-611-bulk-convert2rhel-operations

Results:

Conversion runs successfully.


Notes: I had to republish the content view, since it was published before the repositories were synced. I am investigating to see if we need a separate BZ for that.

Comment 11 errata-xmlrpc 2022-11-16 13:35:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506


Note You need to log in before you can comment on or make changes to this bug.