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 1845399 - List available subscription with noproxy and ondate options failed for datetime.datetime is not JSON serializable
Summary: List available subscription with noproxy and ondate options failed for dateti...
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
urgent
high
Target Milestone: rc
: 8.0
Assignee: William Poteat
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1842946
TreeView+ depends on / blocked
 
Reported: 2020-06-09 07:18 UTC by yanpliu
Modified: 2020-11-04 01:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:39:09 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 2289 0 None closed 1845399: List available subscriptions ondate option fails 2020-12-15 04:18:09 UTC
Red Hat Product Errata RHBA-2020:4460 0 None None None 2020-11-04 01:39:33 UTC

Description yanpliu 2020-06-09 07:18:23 UTC
Description of problem:
List available subscription with noproxy and ondate options failed for datetime.datetime is not JSON serializable

Version-Release number of selected component (if applicable):
subscription-manager-1.27.4-1.el8.x86_64
dnf-plugin-subscription-manager-1.27.4-1.el8.x86_64
subscription-manager-cockpit-1.27.4-1.el8.noarch
python3-subscription-manager-rhsm-1.27.4-1.el8.x86_64
subscription-manager-rhsm-certificates-1.27.4-1.el8.x86_64
tfm-rubygem-katello-3.12.0.41-1.el7sat.noarch
katello-3.12.0-3.el7sat.noarch
candlepin-2.6.16-1.el7sat.noarch

Satellite: Satellite6.6.3
RHEL Build: RHEL-8.3.0-20200608.0 BaseOS x86_64 

How reproducible:
100%

Steps to Reproduce:
1.Register RHEL8.3 to Satellite6.6
#  subscription-manager register --username=admin --password=admin
Registering to: hpe-nehalem-02.hpe2.lab.eng.bos.redhat.com:443/rhsm

The system has been registered with ID: 90897f79-b5d3-48b2-864d-bf3a78162ec3
The registered system name is: kvm-03-guest24.lab.eng.rdu2.redhat.com
2. check List available with noproxy and ondate options
[root@kvm-03-guest24 ~]# date -u -d "- 1 days" "+%Y-%m-%d"
2020-06-08
[root@kvm-03-guest24 ~]# subscription-manager list --avai --ondate=2020-06-08 --noproxy=*.redhat.com
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 2731, in _do_command
    after_date=after_date,
  File "/usr/lib64/python3.6/site-packages/rhsmlib/services/entitlement.py", line 387, in get_available_pools
    cache.write_cache()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 112, in write_cache
    json.dump(self.to_dict(), f, default=json.encode)
  File "/usr/lib64/python3.6/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/lib64/python3.6/json/encoder.py", line 430, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 437, in _iterencode
    o = _default(o)
  File "/usr/lib64/python3.6/site-packages/rhsm/ourjson.py", line 32, in encode
    raise TypeError(repr(obj) + " is not JSON serializable")
TypeError: datetime.datetime(2020, 6, 8, 0, 0) is not JSON serializable

3. Check ondate option
# subscription-manager list --avai --ondate --help
Date entered is invalid. Date should be in YYYY-MM-DD format (example: 2020-06-09)

The ondate option should work well as this:
>>>Remote Run: subscription-manager list --avai --ondate=2020-03-31 --noproxy=*.redhat.com
20:11:48 2020-04-01 08:06:04,196 [INFO]: <<<Return Code: 0
20:11:48 2020-04-01 08:06:04,197 [INFO]: <<<Output:
20:11:48 +-------------------------------------------+
20:11:48     Available Subscriptions
20:11:48 +-------------------------------------------+
20:11:48 Subscription Name:   Red Hat Enterprise Linux Workstation, Premium (1-2 sockets, Up to 1 Guest, Embedded, Billing)
20:11:48 Provides:            dotNET on RHEL (for RHEL Workstation)
20:11:48                      dotNET on RHEL Beta (for RHEL Server)
20:11:48                      Oracle Java (for RHEL Workstation)
20:11:48                      Red Hat CodeReady Linux Builder for x86_64
20:11:48                      Oracle Java (for RHEL Client)
20:11:48                      Red Hat Ansible Engine
20:11:48                      Red Hat Container Images Beta
20:11:48                      Red Hat Container Images
20:11:48                      Red Hat Beta
20:11:48                      Red Hat Software Collections Beta (for RHEL 
......
......
20:11:48 Subscription Name:   Red Hat Enterprise Linux Workstation, Premium (1-2 sockets, Up to 1 Guest, Embedded, Billing)
20:11:48 Provides:            dotNET on RHEL (for RHEL Workstation)
20:11:48                      dotNET on RHEL Beta (for RHEL Server)
20:11:48                      Oracle Java (for RHEL Workstation)
20:11:48                      Red Hat CodeReady Linux Builder for x86_64
20:11:48                      Oracle Java (for RHEL Client)
20:11:48                      Red Hat Ansible Engine
20:11:48                      Red Hat Container Images Beta
20:11:48                      Red Hat Container Images
20:11:48                      Red Hat Beta
20:11:48                      Red Hat Software Collections Beta (for RHEL Workstation)
20:11:48                      Red Hat Enterprise Linux for x86_64
20:11:48                      dotNET on RHEL Beta (for RHEL Workstation)
20:11:48                      dotNET on RHEL (for RHEL Server)
20:11:48                      Red Hat Enterprise Linux Workstation
20:11:48 SKU:                 RH0907987
20:11:48 Contract:            12039427
20:11:48 Pool ID:             8ac213b171352ec50171354bfb6e165e
20:11:48 Provides Management: No
20:11:48 Available:           10
20:11:48 Suggested:           1
20:11:48 Service Type:        PSF
20:11:48 Roles:               Red Hat Enterprise Linux Workstation
20:11:48 Service Level:       Premium
20:11:48 Usage:               Production
20:11:48 Add-ons:             
20:11:48 Subscription Type:   Standard
20:11:48 Starts:              11/27/2019
20:11:48 Ends:                11/26/2020
20:11:48 Entitlement Type:    Physical
20:11:48 


Actual results:
List available subscription with noproxy and ondate options failed for datetime.datetime is not JSON serializable

Expected results:
List available subscription with noproxy and ondate options  should work well

Additional info:

Comment 3 Shwetha Kallesh 2020-07-21 09:55:10 UTC
Verification:
I dont see a traceback , when I try to list available subscription --ondate=<ondate> with no-proxy and without any proxy configuration set on the system, however I see the traceback when there is a invalid proxy configuration set on the system, so moving the bug back to new

[root@kvm-06-guest04 ~]# subscription-manager version
subscription-manager: 1.27.10-1.el8


[root@kvm-06-guest04 ~]# subscription-manager list --avai --ondate=2020-07-28 
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.10', '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 2714, in _do_command
    after_date=after_date,
  File "/usr/lib64/python3.6/site-packages/rhsmlib/services/entitlement.py", line 374, in get_available_pools
    items_per_page=_items_per_page
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 344, in get_available_entitlements
    items_per_page=items_per_page
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 563, in get_filtered_pools_list
    items_per_page=items_per_page
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 282, in list_pools
    profile_mgr.update_check(uep, consumer_uuid)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 469, in update_check
    if not uep.supports_resource(PACKAGES_RESOURCE):
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 969, in supports_resource
    self._load_supported_resources()
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 946, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 882, 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 908, in _request
    info=info, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 706, in _request
    conn.request(request_type, handler, body=body, headers=final_headers)
  File "/usr/lib64/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib64/python3.6/http/client.py", line 1414, in connect
    super().connect()
  File "/usr/lib64/python3.6/http/client.py", line 946, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib64/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/lib64/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused


[root@kvm-06-guest04 ~]# subscription-manager register --serverurl subscription.rhsm.stage.redhat.com --username stage_auto_testuser
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 7ae962c0-76af-4bd6-904d-6ac8920cd2ef
The registered system name is: kvm-06-guest04.hv2.lab.eng.bos.redhat.com
[root@kvm-06-guest04 ~]# subscription-manager list --avai --ondate=2020-07-28 --noproxy=*.redhat.com
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Resilient Storage
Provides:            Red Hat Enterprise Linux Resilient Storage for x86_64
                     Red Hat Enterprise Linux High Availability for x86_64
SKU:                 RH00026
Contract:            12054154
Pool ID:             8a99f9a56fe87e7f01700b106ff5270b
Provides Management: No
Available:           199
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Layered
Usage:               Production
Add-ons:             
Subscription Type:   Instance Based
Starts:              02/03/2020
Ends:                02/02/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Beta Access
Provides:            Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
                     Red Hat Directory Server Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat Certificate System Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
SKU:                 RH00069
Contract:            12032871
Pool ID:             8a99f9ad6e16945a016e180e43670015
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux for Virtual Datacenters, Premium.
Provides:            
SKU:                 RH00001
Contract:            12032951
Pool ID:             8a99f9ad6e16945a016e180e54e70026
Provides Management: No
Available:           99
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Stackable
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical


[root@kvm-06-guest04 ~]# subscription-manager list --avai --ondate=2020-07-28 
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Resilient Storage
Provides:            Red Hat Enterprise Linux Resilient Storage for x86_64
                     Red Hat Enterprise Linux High Availability for x86_64
SKU:                 RH00026
Contract:            12054154
Pool ID:             8a99f9a56fe87e7f01700b106ff5270b
Provides Management: No
Available:           199
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Layered
Usage:               Production
Add-ons:             
Subscription Type:   Instance Based
Starts:              02/03/2020
Ends:                02/02/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Beta Access
Provides:            Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
                     Red Hat Directory Server Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat Certificate System Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
SKU:                 RH00069
Contract:            12032871
Pool ID:             8a99f9ad6e16945a016e180e43670015
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux for Virtual Datacenters, Premium.
Provides:            
SKU:                 RH00001
Contract:            12032951
Pool ID:             8a99f9ad6e16945a016e180e54e70026
Provides Management: No
Available:           99
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Stackable
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical

Comment 4 Shwetha Kallesh 2020-07-21 09:58:06 UTC
Forgot to add proxy configuration for the failing case 

[root@kvm-06-guest04 ~]# cat /etc/rhsm/rhsm.conf | grep proxy
# an http proxy server to use
proxy_hostname = auto-services.usersys.redhat.com
# The scheme to use for the proxy when updating repo definitions, if needed
proxy_scheme = http
# port for http proxy server
proxy_port = 3128                                              --------------> invalid proxy port
# user name for authenticating to an http proxy, if needed
proxy_user =
# password for basic http proxy auth, if needed
proxy_password =
# host/domain suffix blacklist for proxy, if needed
no_proxy =

Comment 5 Shwetha Kallesh 2020-07-21 10:38:34 UTC
Verification:

[root@kvm-06-guest04 ~]# subscription-manager version
subscription-manager: 1.27.10-1.el8

I dont see any "datetime.datetime is not JSON serializable" and have logged a separate bug for the invalid proxy traceback https://bugzilla.redhat.com/show_bug.cgi?id=1859145, so moving this bug to verified 


[root@kvm-06-guest04 ~]# subscription-manager register --serverurl subscription.rhsm.stage.redhat.com --username stage_auto_testuser
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 7ae962c0-76af-4bd6-904d-6ac8920cd2ef
The registered system name is: kvm-06-guest04.hv2.lab.eng.bos.redhat.com
[root@kvm-06-guest04 ~]# subscription-manager list --avai --ondate=2020-07-28 --noproxy=*.redhat.com
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Resilient Storage
Provides:            Red Hat Enterprise Linux Resilient Storage for x86_64
                     Red Hat Enterprise Linux High Availability for x86_64
SKU:                 RH00026
Contract:            12054154
Pool ID:             8a99f9a56fe87e7f01700b106ff5270b
Provides Management: No
Available:           199
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Layered
Usage:               Production
Add-ons:             
Subscription Type:   Instance Based
Starts:              02/03/2020
Ends:                02/02/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Beta Access
Provides:            Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
                     Red Hat Directory Server Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat Certificate System Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
SKU:                 RH00069
Contract:            12032871
Pool ID:             8a99f9ad6e16945a016e180e43670015
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux for Virtual Datacenters, Premium.
Provides:            
SKU:                 RH00001
Contract:            12032951
Pool ID:             8a99f9ad6e16945a016e180e54e70026
Provides Management: No
Available:           99
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Stackable
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical


[root@kvm-06-guest04 ~]# subscription-manager list --avai --ondate=2020-07-28 
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Resilient Storage
Provides:            Red Hat Enterprise Linux Resilient Storage for x86_64
                     Red Hat Enterprise Linux High Availability for x86_64
SKU:                 RH00026
Contract:            12054154
Pool ID:             8a99f9a56fe87e7f01700b106ff5270b
Provides Management: No
Available:           199
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Layered
Usage:               Production
Add-ons:             
Subscription Type:   Instance Based
Starts:              02/03/2020
Ends:                02/02/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Beta Access
Provides:            Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
                     Red Hat Directory Server Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat Certificate System Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
SKU:                 RH00069
Contract:            12032871
Pool ID:             8a99f9ad6e16945a016e180e43670015
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux for Virtual Datacenters, Premium.
Provides:            
SKU:                 RH00001
Contract:            12032951
Pool ID:             8a99f9ad6e16945a016e180e54e70026
Provides Management: No
Available:           99
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Stackable
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Physical

Comment 6 yanpliu 2020-08-17 07:55:26 UTC
Verification:
RHEL-8.3.0-20200811.0

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.14.0.25-Unknown
subscription management rules: 5.37.1
subscription-manager: 1.27.13-1.el8
[root@hpe-dl380pgen8-02-vm-8 ~]# subscription-manager register --username=admin --password=admin
Registering to: hpe-magnycours-01.hpe2.lab.eng.bos.redhat.com:443/rhsm
The system has been registered with ID: a94ea7fc-6e1e-4cec-b562-2eeadbedfc2c
The registered system name is: hpe-dl380pgen8-02-vm-8.hpe2.lab.eng.bos.redhat.com
Red Hat Insights registration enabled.
To opt out of Red Hat Insights, run "insights-client --unregister" or reregister with "--no-insights".
[root@hpe-dl380pgen8-02-vm-8 ~]#  date -u -d "- 1 days" "+%Y-%m-%d"
2020-08-16
[root@hpe-dl380pgen8-02-vm-8 ~]# subscription-manager list --avai --ondate=2020-08-16 --noproxy=*.redhat.com
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (Physical or
                     Virtual Nodes)
Provides:            dotNET on RHEL Beta (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux Scalable File System (for RHEL
                     Server) - Extended Update Support
                     Red Hat Container Images Beta
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat EUCJP Support (for RHEL Server) - Extended Update
                     Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) -
                     Extended Update Support
                     dotNET on RHEL (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64 - Extended Update
                     Support
                     Red Hat Enterprise Linux Resilient Storage for x86_64 -
                     Extended Update Support
                     Red Hat Enterprise Linux High Availability for x86_64 -
                     Extended Update Support
                     Oracle Java (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Enterprise Linux High Performance Networking (for
                     RHEL Server) - Extended Update Support
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Enterprise Linux for x86_64 - Extended Update
                     Support
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update
                     Support
SKU:                 RH00003
Contract:            12065621
Pool ID:             8a90581473d60ac30173d64175991aa8
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Server
Service Level:       Premium
Usage:               Production
Add-ons:             
Subscription Type:   Instance Based
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux High Touch Beta
Provides:            Red Hat Enterprise Linux 7 Load Balancer High Touch Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems High Touch
                     Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little
                     endian High Touch Beta
                     Red Hat Enterprise Linux Resilient Storage High Touch Beta
                     Red Hat Enterprise Linux 7 Workstation High Touch Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z
                     Systems High Touch Beta
                     Red Hat CodeReady Linux Builder for x86_64 High Touch Beta
                     Red Hat Enterprise Linux High Availability High Touch Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64
                     High Touch Beta
                     Red Hat Enterprise Linux for IBM z Systems High Touch Beta
                     Red Hat Enterprise Linux for x86_64 High Touch Beta
                     Red Hat Enterprise Linux for SAP HANA for x86_64 High Touch
                     Beta
                     Red Hat Enterprise Linux Atomic Host HTB
                     Red Hat Container Images HTB
                     Red Hat Enterprise Linux 7 for HPC Compute Node High Touch
                     Beta
                     Red Hat Enterprise Linux for Real Time High Touch Beta
                     Red Hat CodeReady Linux Builder for Power, little endian
                     High Touch Beta
                     Red Hat CodeReady Linux Builder for ARM 64 High Touch Beta
                     Red Hat Enterprise Linux for Power, little endian High Touch
                     Beta
                     Red Hat Enterprise Linux for SAP Applications for Power,
                     little endian High Touch Beta
                     Red Hat Enterprise Linux for ARM 64 High Touch Beta
                     Red Hat Enterprise Linux 7 Desktop High Touch Beta
SKU:                 RH00076
Contract:            12065619
Pool ID:             8a90581473d60ac30173d64173851a8d
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   CloudForms (10-pack)
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Ansible Engine
                     Red Hat CloudForms
                     Red Hat CloudForms Beta
SKU:                 MCT2358
Contract:            12065610
Pool ID:             8a90581473d60ac30173d6416f871a62
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Virtualization for Servers (1 Socket),
                     Standard
Provides:            Red Hat Virtualization
                     Red Hat JBoss Core Services
                     Red Hat Virtualization Host
                     JBoss Enterprise Application Platform
SKU:                 MCT1786
Contract:            12065617
Pool ID:             8a90581473d60ac30173d6416ee11a5b
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Standard
Usage:               
Add-ons:             
Subscription Type:   Standard (Temporary)
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Virtual

Subscription Name:   Red Hat Enterprise Virtualization for Servers (1 Socket),
                     Standard
Provides:            Red Hat Virtualization
                     Red Hat JBoss Core Services
                     Red Hat Virtualization Host
                     JBoss Enterprise Application Platform
SKU:                 MCT1786
Contract:            12065617
Pool ID:             8a90581473d60ac30173d6416ebc1a58
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Standard
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux Workstation, Premium (1-2 sockets,
                     Up to 1 Guest, Embedded, Billing)
Provides:            dotNET on RHEL (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Workstation)
                     Red Hat CodeReady Linux Builder for x86_64
                     Oracle Java (for RHEL Client)
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL Beta (for RHEL Workstation)
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
SKU:                 RH0907987
Contract:            12065614
Pool ID:             8a90581473d60ac30173d64173391a88
Provides Management: No
Available:           10
Suggested:           1
Service Type:        PSF
Roles:               Red Hat Enterprise Linux Workstation
Service Level:       Premium
Usage:               Production
Add-ons:             
Subscription Type:   Standard (Temporary)
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Virtual

Subscription Name:   Red Hat Enterprise Linux Workstation, Premium (1-2 sockets,
                     Up to 1 Guest, Embedded, Billing)
Provides:            dotNET on RHEL (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Workstation)
                     Red Hat CodeReady Linux Builder for x86_64
                     Oracle Java (for RHEL Client)
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL Beta (for RHEL Workstation)
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
SKU:                 RH0907987
Contract:            12065614
Pool ID:             8a90581473d60ac30173d641730f1a82
Provides Management: No
Available:           10
Suggested:           1
Service Type:        PSF
Roles:               Red Hat Enterprise Linux Workstation
Service Level:       Premium
Usage:               Production
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux Desktop (50 pack), Premium
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Client)
                     Red Hat Enterprise Linux Desktop
SKU:                 RH0811325
Contract:            12065615
Pool ID:             8a90581473d60ac30173d6416d4a1a4f
Provides Management: Yes
Available:           500
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Standard (Temporary)
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Virtual

Subscription Name:   Red Hat Enterprise Linux Desktop (50 pack), Premium
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Client)
                     Red Hat Enterprise Linux Desktop
SKU:                 RH0811325
Contract:            12065615
Pool ID:             8a90581473d60ac30173d6416ccf1a4b
Provides Management: Yes
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux Server for HPC Compute Node,
                     Self-support (8 sockets) (Up to 1 guest)
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64 - Extended Update
                     Support
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL (for RHEL Compute Node)
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux for Scientific Computing
                     Oracle Java (for RHEL Compute Node)
                     Red Hat CodeReady Linux Builder for x86_64 - Extended Update
                     Support
                     Red Hat Enterprise Linux High Performance Networking (for
                     RHEL Compute Node)
                     dotNET on RHEL Beta (for RHEL Compute Node)
SKU:                 RH0604852
Contract:            12065616
Pool ID:             8a90581473d60ac30173d641754f1aa3
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Compute Node
Service Level:       Self-Support
Usage:               Production
Add-ons:             
Subscription Type:   Stackable (Temporary)
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Virtual

Subscription Name:   Red Hat Enterprise Linux Server for HPC Compute Node,
                     Self-support (8 sockets) (Up to 1 guest)
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64 - Extended Update
                     Support
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL (for RHEL Compute Node)
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux for Scientific Computing
                     Oracle Java (for RHEL Compute Node)
                     Red Hat CodeReady Linux Builder for x86_64 - Extended Update
                     Support
                     Red Hat Enterprise Linux High Performance Networking (for
                     RHEL Compute Node)
                     dotNET on RHEL Beta (for RHEL Compute Node)
SKU:                 RH0604852
Contract:            12065616
Pool ID:             8a90581473d60ac30173d64175241a9d
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Compute Node
Service Level:       Self-Support
Usage:               Production
Add-ons:             
Subscription Type:   Stackable
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux for IBM POWER + pAVE, Premium (up
                     to 2 sockets)
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux for Power, big endian
SKU:                 MCT1332
Contract:            12065612
Pool ID:             8a90581473d60ac30173d64171121a7f
Provides Management: No
Available:           80
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Standard (Temporary)
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Virtual

Subscription Name:   Red Hat Enterprise Linux for IBM POWER + pAVE, Premium (up
                     to 2 sockets)
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux for Power, big endian
SKU:                 MCT1332
Contract:            12065612
Pool ID:             8a90581473d60ac30173d64170eb1a7b
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Beta Access
Provides:            Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power,
                     little endian
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
                     Red Hat Directory Server Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64
                     Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z
                     Systems Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux for SAP Applications for Power,
                     little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat CodeReady Linux Builder for Power, little endian
                     Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat Certificate System Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little
                     endian Beta
SKU:                 RH00069
Contract:            12065618
Pool ID:             8a90581473d60ac30173d6416fd81a68
Provides Management: No
Available:           10
Suggested:           1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Subscription Type:   Standard
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux Server for HPC Compute Node with
                     Smart Management, Self-Support (Physical Node, Embedded
                     Partner Support)
Provides:            Red Hat Beta
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL (for RHEL Compute Node)
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux for Scientific Computing
                     Oracle Java (for RHEL Compute Node)
                     dotNET on RHEL Beta (for RHEL Compute Node)
SKU:                 RH00571
Contract:            12065613
Pool ID:             8a90581473d60ac30173d6416ddb1a52
Provides Management: Yes
Available:           10
Suggested:           1
Service Type:        PSF
Roles:               Red Hat Enterprise Linux Compute Node
Service Level:       Self-Support
Usage:               Production
Add-ons:             
Subscription Type:   Stackable
Starts:              04/27/2020
Ends:                04/26/2021
Entitlement Type:    Physical

[root@hpe-dl380pgen8-02-vm-8 ~]# subscription-manager list --avai --ondate --help
Date entered is invalid. Date should be in YYYY-MM-DD format (example: 2020-08-17)

Comment 9 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


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