RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1855437 - subscription-manager: syspurpose raises exception 'cannot import logutil' after I updated subscription-manager related packages
Summary: subscription-manager: syspurpose raises exception 'cannot import logutil' aft...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1903942
TreeView+ depends on / blocked
 
Reported: 2020-07-09 20:39 UTC by Jan Stavel
Modified: 2021-05-18 13:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 13:32:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2327 0 None closed 1855437: syspurpose CLI should require sub-man rpm; ENT-2602 2021-02-03 02:30:39 UTC
Github candlepin subscription-manager pull 2361 0 None closed 1855437: Fixed rpm dependency of subscription-manager; ENT-3250 2021-02-03 02:30:39 UTC

Description Jan Stavel 2020-07-09 20:39:32 UTC
After I updated packages
subscription-manager*

syspurpose stopped working.

[root@jstavel-auto8 ~]# rpm -qa | egrep 'syspurpose|subscription-manager'
dnf-plugin-subscription-manager-1.26.17-1.git.0.f3cf306.el8.x86_64
subscription-manager-cockpit-1.26.17-1.git.0.f3cf306.el8.noarch
subscription-manager-rhsm-certificates-1.26.17-1.git.0.f3cf306.el8.x86_64
subscription-manager-migration-1.26.17-1.git.0.f3cf306.el8.x86_64
python3-subscription-manager-rhsm-1.26.17-1.git.0.f3cf306.el8.x86_64

python3-syspurpose-1.26.9-1.el8.x86_64
^^^ this is older version that does not work with newer versions of subscription-manager* packages

subscription-manager-initial-setup-addon-1.26.9-1.el8.x86_64
subscription-manager-plugin-ostree-1.26.17-1.git.0.f3cf306.el8.x86_64
subscription-manager-1.26.17-1.git.0.f3cf306.el8.x86_64
subscription-manager-migration-data-2.0.51-1.noarch


[root@jstavel-auto8 ~]# syspurpose set-sla Premium
Traceback (most recent call last):
  File "/usr/sbin/syspurpose", line 11, in <module>
    load_entry_point('syspurpose==1.26.9', 'console_scripts', 'syspurpose')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.6/site-packages/syspurpose/main.py", line 19, in <module>
    from syspurpose import cli
  File "/usr/lib/python3.6/site-packages/syspurpose/cli.py", line 21, in <module>
    from subscription_manager import logutil
ImportError: cannot import name 'logutil'



[root@jstavel-auto8 ~]# syspurpose status
Traceback (most recent call last):
  File "/usr/sbin/syspurpose", line 11, in <module>
    load_entry_point('syspurpose==1.26.9', 'console_scripts', 'syspurpose')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.6/site-packages/syspurpose/main.py", line 19, in <module>
    from syspurpose import cli
  File "/usr/lib/python3.6/site-packages/syspurpose/cli.py", line 21, in <module>
    from subscription_manager import logutil
ImportError: cannot import name 'logutil'

Comment 1 Archana Pandey 2020-09-24 09:18:00 UTC
recreating missing sub-man dependencies from list of dependencies for python3-syspurpose:

[root@localhost /]# rpm -q subscription-manager
subscription-manager-1.27.13-1.el8.x86_64
[root@localhost /]# rpm -q python3-syspurpose
python3-syspurpose-1.27.13-1.el8.x86_64

[root@localhost /]# rpm -q python3-syspurpose --requires
/usr/libexec/platform-python
python(abi) = 3.6
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1                            <<<<<<<<<<<<<<<<<subscription-manager is not listed as a dependency


[root@localhost /]# yum upgrade python3-syspurpose
Updating Subscription Management repositories.
Last metadata expiration check: 0:11:20 ago on Thu 24 Sep 2020 01:09:08 PM IST.
Dependencies resolved.
==========================
 Package                             Architecture            Version                          Repository                                          Size
==========================
Upgrading:
 python3-syspurpose                  x86_64                  1.27.15-1.el8                    rhel-8-for-x86_64-baseos-htb-rpms                  298 k

Transaction Summary
==========================
Upgrade  1 Package

Total download size: 298 k   ^^^---subscription-manager not listed as dependency while upgrade
Is this ok [y/N]: yes:       




********************************************************************************************************

Verifying in build: python3-syspurpose-1.28.3-1.git.10.32f43d9.el8.x86_64.rpm

[root@localhost abc]# rpm -q python3-syspurpose
python3-syspurpose-1.28.3-1.git.6.a6d8bbc.el8.x86_64

[root@localhost abc]# rpm -q subscription-manager
subscription-manager-1.28.3-1.git.6.a6d8bbc.el8.x86_64

[root@localhost abc]# rpm -q python3-syspurpose --requires
/usr/libexec/platform-python
python(abi) = 3.6
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
subscription-manager = 1.28.3-1.git.6.a6d8bbc.el8    <<<<<<<<<<<<<< subscription-manager listed as dependency

[root@localhost abc]# rpm -q subscription-manager --requires
.
.
.
python3-subscription-manager-rhsm = 1.28.3          
python3-syspurpose
rpmlib(CompressedFileNames) <= 3.0.4-1
.
.
virt-what


[root@localhost /]# yum upgrade python3-syspurpose
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:27 ago on Thu 24 Sep 2020 01:36:05 PM IST.
Dependencies resolved.
===========================
 Package                                Architecture             Version                                       Repository                         Size
===========================
Upgrading:
 python3-syspurpose                     x86_64                   1.28.3-1.git.10.32f43d9.el8                   rhsm_master.el8                   296 k
 subscription-manager                   x86_64                   1.28.3-1.git.10.32f43d9.el8                   rhsm_master.el8                   1.1 M

Transaction Summary               ^^----subscription-manager as dependency
===========================
Upgrade  2 Packages

Total download size: 1.4 M
Is this ok [y/N]: n
Operation aborted.


[root@localhost /]# yum upgrade subscription-manager
Updating Subscription Management repositories.
Jenkins CI builds of Red Hat Subscription Manager for RHEL                                                             2.6 kB/s | 3.0 kB     00:01    
Dependencies resolved.
===========================
 Package                                Architecture             Version                                       Repository                         Size
===========================
Upgrading:
 python3-syspurpose                     x86_64                   1.28.3-1.git.10.32f43d9.el8                   rhsm_master.el8                   296 k
 subscription-manager                   x86_64                   1.28.3-1.git.10.32f43d9.el8                   rhsm_master.el8                   1.1 M

Transaction Summary             ^^^^-------  python3-syspurpose getting upgraded as dependency
===========================
Upgrade  2 Packages

Total download size: 1.4 M
Is this ok [y/N]: n
Operation aborted.


Actual Results: Verified dependency of python3-syspurpose on sub-man

Comment 2 Archana Pandey 2020-09-24 13:14:20 UTC
Early testing comment: Comment 1

Comment 4 Archana Pandey 2020-11-03 12:56:17 UTC
Early testing:

Verifying on latest dev build: subscription-manager-1.28.5-1.el8.x86_64

[root@kvm-03-guest14 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.5-1.el8
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# rpm -q python3-syspurpose
python3-syspurpose-1.28.5-1.el8.x86_64

[root@kvm-03-guest14 ~]# rpm -q python3-syspurpose --requires --verbose 
auto: /usr/libexec/platform-python
auto: python(abi) = 3.6
rpmlib: rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib: rpmlib(FileDigests) <= 4.6.0-1
rpmlib: rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib: rpmlib(PayloadIsXz) <= 5.2-1
manual: subscription-manager = 1.28.5-1.el8        <<<< subscription-manager listed as dependency
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# rpm -q subscription-manager --requires
/bin/sh
:
:
python3-subscription-manager-rhsm = 1.28.5
python3-syspurpose
:
:
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# yum remove subscription-manager
Updating Subscription Management repositories.
Dependencies resolved.
=========================================================================================================================================================================================
 Package                                                         Architecture                    Version                                   Repository                               Size
=========================================================================================================================================================================================
Removing:
 subscription-manager                                            x86_64                          1.28.5-1.el8                              @beaker-BaseOS                          4.3 M
Removing dependent packages:
 subscription-manager-plugin-ostree                              x86_64                          1.28.5-1.el8                              @beaker-BaseOS                           54 k
 tuned                                                           noarch                          2.14.0-4.el8                              @beaker-BaseOS                          765 k
Removing unused dependencies:
 dmidecode                                                       x86_64                          1:3.2-6.el8                               @beaker-BaseOS                          217 k
 dnf-plugin-subscription-manager                                 x86_64                          1.28.5-1.el8                              @beaker-BaseOS                           87 k
 hdparm                                                          x86_64                          9.54-2.el8                                @beaker-BaseOS                          184 k
 python3-configobj                                               noarch                          5.0.6-11.el8                              @beaker-BaseOS                          342 k
 python3-dmidecode                                               x86_64                          3.12.2-15.el8                             @beaker-BaseOS                          294 k
 python3-ethtool                                                 x86_64                          0.14-3.el8                                @beaker-BaseOS                           92 k
 python3-iniparse                                                noarch                          0.4-31.el8                                @beaker-BaseOS                          106 k
 python3-inotify                                                 noarch                          0.9.6-13.el8                              @beaker-BaseOS                          243 k
 python3-librepo                                                 x86_64                          1.12.0-2.el8                              @beaker-BaseOS                          172 k
 python3-libxml2                                                 x86_64                          2.9.7-9.el8                               @beaker-BaseOS                          1.3 M
 python3-linux-procfs                                            noarch                          0.6.2-2.el8                               @beaker-BaseOS                           98 k
 python3-perf                                                    x86_64                          4.18.0-240.9.el8                          @beaker-BaseOS                          348 k
 python3-pyudev                                                  noarch                          0.21.0-7.el8                              @beaker-BaseOS                          315 k
 python3-schedutils                                              x86_64                          0.6-6.el8                                 @beaker-BaseOS                           44 k
 python3-subscription-manager-rhsm                               x86_64                          1.28.5-1.el8                              @beaker-BaseOS                          399 k
 python3-syspurpose                                              x86_64                          1.28.5-1.el8                          :
:                           ^^^---- rpm remove dependency

Transaction Summary
=========================================================================================================================================================================================
Remove  22 Packages

Freed space: 10 M
Is this ok [y/N]: n
Operation aborted.
[root@kvm-03-guest14 ~]# yum remove python3-syspurpose
Updating Subscription Management repositories.
Dependencies resolved.
=========================================================================================================================================================================================
 Package                                                         Architecture                    Version                                   Repository                               Size
=========================================================================================================================================================================================
Removing:
 python3-syspurpose                                              x86_64                          1.28.5-1.el8                              @beaker-BaseOS                          127 k
Removing dependent packages:
 subscription-manager                                            x86_64                          1.28.5-1.el8  <<< dependency                            @beaker-BaseOS                          4.3 M
 subscription-manager-plugin-ostree                              x86_64                          1.28.5-1.el8                              @beaker-BaseOS                           54 k
:
:
:                            

Transaction Summary
=========================================================================================================================================================================================
Remove  22 Packages

Freed space: 10 M
Is this ok [y/N]: n
Operation aborted.
[root@kvm-03-guest14 ~]# 

Verifying upgrade with help of scratch master build as no higher version of dev build available with fix at present:

[root@kvm-01-guest12 ~]# yum upgrade subscription-manager
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 0:02:18 ago on Tue 03 Nov 2020 07:50:53 AM EST.
Dependencies resolved.
=========================================================================================================================================================================================
 Package                                        Architecture                     Version                                                 Repository                                 Size
=========================================================================================================================================================================================
Upgrading:
 python3-syspurpose                             x86_64                           1.28.5-1.git.0.f474dc9.el8                              rhsm_master.el8                           297 k
 subscription-manager                           x86_64                           1.28.5-1.git.0.f474dc9.el8                              rhsm_master.el8                           1.1 M

Transaction Summary
=========================================================================================================================================================================================
Upgrade  2 Packages

Total download size: 1.4 M
Is this ok [y/N]: n
Operation aborted.
[root@kvm-01-guest12 ~]#

Actual Results: subscription-manager is now part of rpm dependency for python3-syspurpose

Based on above results marking verified to Tested

Comment 7 John Sefler 2020-11-10 15:42:09 UTC
Testing RHEL Compose DISTRO=RHEL-8.4.0-20201110.n.1...


      Beaker Test information:
                         HOSTNAME=kvm-06-guest24.hv2.lab.eng.bos.redhat.com
                            JOBID=4719044
                         RECIPEID=9040811
                    RESULT_SERVER=
                           DISTRO=RHEL-8.4.0-20201110.n.1
                     ARCHITECTURE=x86_64

      Job Whiteboard:  RHEL-8.4.0-20201110.n.1 BaseOS x86_64

      Recipe Whiteboard: 
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
[root@kvm-06-guest24 ~]# 
[root@kvm-06-guest24 ~]# rpm -q subscription-manager python3-syspurpose
subscription-manager-1.28.5-1.el8.x86_64
python3-syspurpose-1.28.5-1.el8.x86_64
[root@kvm-06-guest24 ~]# 
[root@kvm-06-guest24 ~]# rpm -q --changelog subscription-manager | grep 1855437
- 1855437: syspurpose CLI should require sub-man rpm; ENT-2602
[root@kvm-06-guest24 ~]# rpm -q --changelog python3-syspurpose | grep 1855437
- 1855437: syspurpose CLI should require sub-man rpm; ENT-2602
[root@kvm-06-guest24 ~]# 
[root@kvm-06-guest24 ~]# rpm -q python3-syspurpose --requires | grep subscription-manager
subscription-manager = 1.28.5-1.el8
[root@kvm-06-guest24 ~]# 
[root@kvm-06-guest24 ~]# rpm -q subscription-manager --requires | grep python3-syspurpose
python3-syspurpose
[root@kvm-06-guest24 ~]# 

Hmmmm.... This is not the proper fix for the upgrade scenario in comment 0
https://github.com/candlepin/subscription-manager/pull/2327/files

The proper fix should have made subscription-manager require an exact version of python3-syspurpose and left python3-syspurpose requirements as-is (without requiring subscription-manager).

Expected Results...
[root@kvm-06-guest24 ~]# rpm -q python3-syspurpose --requires | grep subscription-manager
[root@kvm-06-guest24 ~]#                <========== EXPECTED NO REQUIREMENT ON subscription-manager
[root@kvm-06-guest24 ~]# rpm -q subscription-manager --requires | grep python3-syspurpose
python3-syspurpose = 1.28.5-1.el8       <========== EXPECTED subscription-manager TO REQUIRE VERSION 1.28.5-1.el8 OF python3-syspurpose
[root@kvm-06-guest24 ~]# 

Moving this bug back to NEW/FailedQA and I expect the change in https://github.com/candlepin/subscription-manager/pull/2327/files to be reverted and the proper fix to be "subscription-manager rpm should require an exact version of python3-syspurpose rpm".

Comment 9 John Sefler 2020-12-08 19:54:43 UTC
Pre-verifying the following development build targeted for RHEL-8.4....

[root@kvm-05-guest11 ~]# rpm -q subscription-manager python3-syspurpose
subscription-manager-1.28.7-1.git.0.5b601d5.el8.x86_64
python3-syspurpose-1.28.7-1.git.0.5b601d5.el8.x86_64
[root@kvm-05-guest11 ~]# 
[root@kvm-05-guest11 ~]# rpm -q subscription-manager --changelog | grep 1855437
- 1855437: Fixed rpm dependency of subscription-manager; ENT-3250 (#2365)          <===== THIS SECONDARY PATCH FIXES FAILED COMMENT 7
- 1855437: syspurpose CLI should require sub-man rpm; ENT-2602
[root@kvm-05-guest11 ~]# 
[root@kvm-05-guest11 ~]# rpm -q python3-syspurpose --requires | grep subscription-manager
[root@kvm-05-guest11 ~]# 
[root@kvm-05-guest11 ~]# rpm -q subscription-manager --requires | grep python3-syspurpose
python3-syspurpose = 1.28.7-1.git.0.5b601d5.el8
[root@kvm-05-guest11 ~]# 

Verified:Tested the expected required package dependencies for subscription-manager now requires an exact version of python3-syspurpose

Comment 11 John Sefler 2020-12-11 15:00:23 UTC
Verifying fix in nightly compose RHEL-8.4.0-20201211.n.0...

**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
      Beaker Test information:
                         HOSTNAME=hpe-dl380pgen8-02-vm-9.hpe2.lab.eng.bos.redhat.com
                            JOBID=4807407
                         RECIPEID=9178576
                    RESULT_SERVER=
                           DISTRO=RHEL-8.4.0-20201211.n.0
                     ARCHITECTURE=x86_64

      Job Whiteboard:  RHEL-8.4.0-20201211.n.0 BaseOS x86_64 

      Recipe Whiteboard: 
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# rpm -q subscription-manager python3-syspurpose
subscription-manager-1.28.7-1.el8.x86_64
python3-syspurpose-1.28.7-1.el8.x86_64
[root@hpe-dl380pgen8-02-vm-9 ~]# 
[root@hpe-dl380pgen8-02-vm-9 ~]# rpm -q subscription-manager --changelog | grep 1855437
- 1855437: Fixed rpm dependency of subscription-manager; ENT-3250 (#2365)
- 1855437: syspurpose CLI should require sub-man rpm; ENT-2602
[root@hpe-dl380pgen8-02-vm-9 ~]# 
[root@hpe-dl380pgen8-02-vm-9 ~]# rpm -q python3-syspurpose --requires | grep subscription-manager
[root@hpe-dl380pgen8-02-vm-9 ~]# 
[root@hpe-dl380pgen8-02-vm-9 ~]# rpm -q subscription-manager --requires | grep python3-syspurpose
python3-syspurpose = 1.28.7-1.el8
[root@hpe-dl380pgen8-02-vm-9 ~]# 

VERIFIED: the expected required package dependencies for subscription-manager now requires an exact version of python3-syspurpose.  In the scenario defined in comment 0, this dependency will now force the upgrade of python3-syspurpose to follow when a user does "yum upgrade subscription-manager*" and prevent he failed load_entry_point.

Comment 13 errata-xmlrpc 2021-05-18 13:32:41 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 (subscription-manager bug fix and enhancement update), 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/RHBA-2021:1575


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