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 1659263 - subscription-manager dnf plugin executes self.config() on init causing the config function to be executed twice
Summary: subscription-manager dnf plugin executes self.config() on init causing the co...
Keywords:
Status: CLOSED DUPLICATE of bug 1643128
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 22:48 UTC by Ryan Blakley
Modified: 2019-01-14 15:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-14 15:24:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ryan Blakley 2018-12-13 22:48:05 UTC
Description of problem: In the /usr/lib/python3.6/site-packages/dnf-plugins/subscription-manager.py __init__ function it calls self.confg(). This causes the config function to be ran twice in /usr/lib/python3.6/site-packages/dnf/cli/cli.py since it inits all plugins with self.base.init_plugins(opts.disableplugin, opts.enableplugin, self) then executes config on all plugins with self.base.configure_plugins(). This causes messages printed to the console in the subscription-manager plugin to be printed twice for ever yum command I've ran.


Version-Release number of selected component (if applicable):
- 4.0.4-1.el8


Steps to Reproduce:
1. Run pretty much any yum command, but I tested with # yum repolist


Actual results:
** In my example my system is subscribed, if it's not subscribed it prints the this system isn't registered message twice along with the below message twice.

-root@localhost ~ # time yum repolist
Updating Subscription Management repositories. <<<
Updating Subscription Management repositories. <<<
Last metadata expiration check: 0:58:29 ago on Thu 13 Dec 2018 03:53:04 PM EST.
repo id                                     repo name                                                           status
rhel-8-for-x86_64-appstream-htb-rpms        Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB (RPMs)        6,185
rhel-8-for-x86_64-baseos-htb-rpms           Red Hat Enterprise Linux 8 for x86_64 - BaseOS HTB (RPMs)           2,688
 
real    0m2.437s
user    0m1.747s
sys     0m0.093s


Expected results:
** I commented out the self.config() line in /usr/lib/python3.6/site-packages/dnf-plugins/subscription-manager.py

- root@localhost ~ # time yum repolist
Updating Subscription Management repositories.
Last metadata expiration check: 0:24:39 ago on Thu 13 Dec 2018 05:11:21 PM EST.
repo id                                     repo name                                                           status
rhel-8-for-x86_64-appstream-htb-rpms        Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB (RPMs)        6,185
rhel-8-for-x86_64-baseos-htb-rpms           Red Hat Enterprise Linux 8 for x86_64 - BaseOS HTB (RPMs)           2,688

real	0m1.834s
user	0m1.346s
sys	0m0.097s


Additional info:

Comment 2 Kevin Howell 2019-01-14 15:24:35 UTC

*** This bug has been marked as a duplicate of bug 1643128 ***


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