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 1489917 - disabling yum plugins using "false" (rather than "0") causes traceback: invalid literal for int() with base 10: 'false'
Summary: disabling yum plugins using "false" (rather than "0") causes traceback: inval...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-08 16:11 UTC by John Sefler
Modified: 2018-04-10 09:51 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.20.2-1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 09:51:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github /candlepin subscription-manager pull 1701 0 None None None 2020-09-07 07:02:12 UTC
Red Hat Product Errata RHBA-2018:0681 0 None None None 2018-04-10 09:51:43 UTC

Description John Sefler 2017-09-08 16:11:14 UTC
Description of problem:
When setting the enabled configuration value in /etc/yum/pluginconf.d/product-id.conf or /etc/yum/pluginconf.d/subscription-manager.conf to "false" or "true" rather than "0" or "1", subscription-manager is blocked by a traceback...
   invalid literal for int() with base 10: 'false'

Note: Yum gracefully accepts both "false"|"0" as booleans values, but subscription-manager does not.

Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# rpm -q subscription-manager
subscription-manager-1.20.1-1.git.48.bc07705.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel7 ~]# subscription-manager unregister 
This system is currently not registered.
[root@jsefler-rhel7 ~]# sed -i 's/^enabled\s*=.*$/enabled=false/g' /etc/yum/pluginconf.d/product-id.conf
[root@jsefler-rhel7 ~]# cat /etc/yum/pluginconf.d/product-id.conf
[main]
enabled=false
[root@jsefler-rhel7 ~]# yum repolist
Loaded plugins: langpacks, search-disabled-repos, subscription-manager    <=== NOTICE product-id WAS NOT LOADED
This system is not registered with an entitlement server. You can use subscription-manager to register.
repolist: 0
[root@jsefler-rhel7 ~]# subscription-manager version
invalid literal for int() with base 10: 'false'
[root@jsefler-rhel7 ~]# 


Actual results:
  invalid literal for int() with base 10: 'false'

Expected results:
  a WARNING message will be displayed when /etc/yum/pluginconf.d/product-id.conf is disabled informing us that it was automatically enabled.


Additional info:

[root@jsefler-rhel7 ~]# tail -f /var/log/rhsm/rhsm.log
2017-09-08 11:42:28,448 [DEBUG] subscription-manager:3072:MainThread @repolib.py:150 - Yum plugin: "/etc/yum/pluginconf.d/subscription-manager.conf" already enabled. Nothing to do.
2017-09-08 11:42:28,449 [ERROR] subscription-manager:3072:MainThread @managercli.py:181 - exception caught in subscription-manager
2017-09-08 11:42:28,449 [ERROR] subscription-manager:3072:MainThread @managercli.py:182 - invalid literal for int() with base 10: 'false'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 96, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2640, in main
    enabled_yum_plugins = YumPluginManager.enable_yum_plugins()
  File "/usr/lib/python2.7/site-packages/subscription_manager/repolib.py", line 148, in enable_yum_plugins
    is_plugin_enabled = yum_plugin_config.getint('main', 'enabled')
  File "/usr/lib/python2.7/site-packages/iniparse/compat.py", line 135, in getint
    return int(self.get(section, option))
ValueError: invalid literal for int() with base 10: 'false'

Comment 2 Shwetha Kallesh 2017-11-10 06:25:54 UTC
[root@dhcp35-121 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.20.5-1.el7

[root@dhcp35-121 ~]#  sed -i 's/^enabled\s*=.*$/enabled=false/g' /etc/yum/pluginconf.d/product-id.conf
[root@dhcp35-121 ~]# cat /etc/yum/pluginconf.d/product-id.conf
[main]
enabled=false

[root@dhcp35-121 ~]#  yum repolist
Loaded plugins: langpacks, search-disabled-repos, subscription-manager
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
repolist: 0

Observe the warning :

[root@dhcp35-121 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.20.5-1.el7


WARNING

The yum plugins: /etc/yum/pluginconf.d/product-id.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior.

Comment 5 errata-xmlrpc 2018-04-10 09:51:13 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, 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-2018:0681


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