Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1838423

Summary: Traceback while trying to use subscription-manager to list and set a release
Product: Red Hat Enterprise Linux 8 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact:
Priority: urgent    
Version: 8.3CC: arpandey, cdonnell, jhnidek, jsefler, redakkan, wpoteat
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:39:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1842946    

Description Shwetha Kallesh 2020-05-21 06:39:10 UTC
Description of problem:
Traceback while trying to set release version to unavailable value

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

[root@kvm-06-guest05 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.11-1
subscription management rules: 5.39
subscription-manager: 1.27.3

How reproducible:


Steps to Reproduce:
[root@kvm-06-guest05 ~]# subscription-manager register --username=stage_auto_syspurpose001 --password=redhat --autosubscribe --servicelevel=Dev-Enterprise --force
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID 265b2007-2daa-4a56-9d75-ecd96cb3c603 has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 08f4cb58-b8f8-4aea-b174-972785e0f6f4
The registered system name is: kvm-06-guest05.hv2.lab.eng.bos.redhat.com
Service level set to: Dev-Enterprise
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 Beta
Status:       Subscribed

[root@kvm-06-guest05 ~]# subscription-manager release --set=Foo_1.0
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.3', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3086, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1748, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path, list(ent_cert_key_pairs))
TypeError: get_versions() takes 2 positional arguments but 3 were given


Actual results:
traceback

Expected results:

No releases match 'Foo_1.0'.  Consult 'release --list' for a full listing.

Additional info:

Comment 1 John Sefler 2020-06-10 21:31:25 UTC
This traceback also occurs for valid attempts to use the release module....

[root@kvm-03-guest17 ~]# rpm -q subscription-manager
subscription-manager-1.27.4-1.el8.x86_64

[root@kvm-03-guest17 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

[root@kvm-03-guest17 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.3
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         10/29/2019
Ends:           10/28/2020

[root@kvm-03-guest17 ~]# subscription-manager release
Release not set

[root@kvm-03-guest17 ~]# subscription-manager release --list
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.4', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3087, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1763, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path, list(ent_cert_key_pairs))
TypeError: get_versions() takes 2 positional arguments but 3 were given

[root@kvm-03-guest17 ~]# subscription-manager release --set=8.1
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.4', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3087, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1744, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path, list(ent_cert_key_pairs))
TypeError: get_versions() takes 2 positional arguments but 3 were given
[root@kvm-03-guest17 ~]# 


There is no additional info in /var/log/rhsm.log

Comment 4 Archana Pandey 2020-06-29 15:45:42 UTC
Reproducing issue on subscription-manager-1.27.4-1.el8.x86_64

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

[root@kvm-02-guest04 /]# subscription-manager  version
server type: This system is currently not registered.
subscription management server: 2.9.27-1
subscription management rules: 5.39
subscription-manager: 1.27.4
[root@kvm-02-guest04 /]# 

Steps to reproduce issue:
[root@kvm-02-guest04 /]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

[root@kvm-02-guest04 /]# subscription-manager release --set=Foo_1.0
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.4', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3087, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1744, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path, list(ent_cert_key_pairs))
TypeError: get_versions() takes 2 positional arguments but 3 were given


[root@kvm-02-guest04 /]# subscription-manager release --list
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.4', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3087, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1763, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path, list(ent_cert_key_pairs))
TypeError: get_versions() takes 2 positional arguments but 3 were given
	
======================================================================================================================================================

Verifying bug against subscription-manager: 1.27.8-1.el8

Version-Release number of selected component (if applicable):
Beaker Test information:
                         HOSTNAME=kvm-02-guest04.rhts.eng.brq.redhat.com
                            JOBID=4388698
                         RECIPEID=8496141
                    RESULT_SERVER=
                           DISTRO=RHEL-8.3.0-20200629.n.0
                     ARCHITECTURE=x86_64

[root@kvm-02-guest04 /]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.14-1
subscription management rules: 5.40
subscription-manager: 1.27.8-1.el8

[root@kvm-02-guest04 ~]# rpm -qa subscription-manager --changelog | grep 1838423
- 1838423: Correct method call signature for release (wpoteat)

[root@kvm-02-guest04 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

Issue verification steps:
[root@kvm-02-guest04 ~]# subscription-manager release --set=Foo_1.0
No releases match 'Foo_1.0'.  Consult 'release --list' for a full listing.     <<<< No trace

[root@kvm-02-guest04 ~]# subscription-manager release --list          
No release versions available, please check subscriptions.                     <<<< No trace
[root@kvm-02-guest04 ~]# 

Actual results:
No releases match 'Foo_1.0'.  Consult 'release --list' for a full listing.

Expected results:

No releases match 'Foo_1.0'.  Consult 'release --list' for a full listing.

Comment 5 Craig Donnelly 2020-07-07 16:05:44 UTC
Moving this back to NEW.

The verification of this was done with a beta product certificate and the paths did not have a listing file to functionally test this feature, therefore missing that there were additional tracebacks.

Checking with a normal product-cert against production CDN shows additional failure when attempting to read the content of the listing file:

root@dhcp-8-30-168 ~]# subscription-manager release --list
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.8', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3070, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1746, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 430, in get_versions
    result = self.conn.request_get(handler)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 871, in request_get
    return self._request("GET", method, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 902, in _request
    return json.loads(result['content'])
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 342, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 2)

Also prevents setting the release to anything:

[root@dhcp-8-30-168 ~]# subscription-manager release --set 8.2
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.8', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3070, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 545, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1727, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 62, in get_releases
    return provider.get_releases()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/release.py", line 148, in get_releases
    data = self.content_connection.get_versions(listing_path)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 430, in get_versions
    result = self.conn.request_get(handler)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 871, in request_get
    return self._request("GET", method, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 902, in _request
    return json.loads(result['content'])
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 342, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 2)

Comment 7 Archana Pandey 2020-08-11 16:16:35 UTC
Validating issue with GA product-cert on stage server

[root@archana-automation product]# subscription-manager version 
server type: Red Hat Subscription Management
subscription management server: 3.1.16-1
subscription management rules: 5.40
subscription-manager: 1.27.13-1.el8

Steps to verify:
[root@archana-automation /]# rpm -qa subscription-manager --changelog | grep 1838423
- 1838423: Fix getting list of releases from CDN; (jhnidek)
[root@archana-automation /]# 
[root@archana-automation /]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.3
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         08/07/2020
Ends:           08/06/2021

[root@archana-automation /]# subscription-manager release --list
+-------------------------------------------+
          Available Releases
+-------------------------------------------+
8
8.0
8.1
8.2
[root@archana-automation /]# subscription-manager release --set 8.2
Release set to: 8.2

[root@archana-automation /]# subscription-manager release --show 
Release: 8.2

[root@archana-automation /]# subscription-manager release --set FooBar_1.0
No releases match 'FooBar_1.0'.  Consult 'release --list' for a full listing.

[root@archana-automation /]# subscription-manager release --show 
Release: 8.2

[root@archana-automation /]# subscription-manager release --unset
Release preference has been unset

[root@archana-automation /]# subscription-manager release --show 
Release not set
[root@archana-automation /]# 

RESULT: No traceback seen, moving to verified state

Comment 10 errata-xmlrpc 2020-11-04 01:39:09 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-2020:4460