Project

General

Profile

Bug #30749

Add /owners/:id/system_purpose to RHSM Proxies Controller

Added by Jonathon Turel 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

b'Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1871016 \n\n*Description of problem:*\nmanagercli.py:1364 - Error: Unable to retrieve service levels: HTTP error (404 - Not Found)\n\n*Version-Release number of selected component (if applicable):*\nsubscription-manager-1.27.15-1.el8.x86_64\ndnf-plugin-subscription-manager-1.27.15-1.el8.x86_64\npython3-subscription-manager-rhsm-1.27.15-1.el8.x86_64\nsubscription-manager-rhsm-certificates-1.27.15-1.el8.x86_64\ntfm-rubygem-katello-3.16.0-0.16.rc5.1.el7sat.noarch\nkatello-3.16.0-0.4.rc4.el7sat.noarch\ncandlepin-3.1.16-1.el7sat.noarch\n\n*How reproducible:*\nalways\n\n*Steps to Reproduce:*\nThis issue happens when I try to reproduce another bug:\n1. On RHEL-8.3.0-20200811.0 system, update subscription-manager version from subscription-manager-1.27.13-1.el8.x86_64 to subscription-manager-1.27.15-1.el8.\n\n2. Register RHEL-8.3.0-20200811.0 against Satellite6.8.0-snap-11.0:\n[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager register\nRegistering to: ent-01-vm-02.lab.eng.nay.redhat.com:443/rhsm\nUsername: admin\nPassword: \nThe system has been registered with ID: 07de19de-a1e7-46de-a1a9-55b995de31d0\nThe registered system name is: ibm-x3650m4-01-vm-02.ibm2.lab.eng.bos.redhat.com\n[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager service-level --show\nService level preference not set\n[root@ibm-x3650m4-01-vm-02 ~]# syspurpose show\n{}\n\n3. Set service level by subscription-manager:\n[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager service-level --set=Self-Support\n[root@ibm-x3650m4-01-vm-02 ~]# echo $?\n70\n[root@ibm-x3650m4-01-vm-02 ~]# syspurpose show\n{}\n[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager service-level --show\nService level preference not set\n[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager service-level --set=Self-Support\n\n\n4. Check rhsm.log:\n[root@ibm-x3650m4-01-vm-02 ~]# tail -f /var/log/rhsm/rhsm.log \n writer.save(ostree_config)\n File "/usr/lib64/python3.6/site-packages/subscription_manager/plugin/ostree/model.py", line 317, in save\n self.repo_file.save()\n File "/usr/lib64/python3.6/site-packages/subscription_manager/plugin/ostree/config.py", line 135, in save\n self.config_parser.save()\n File "/usr/lib64/python3.6/site-packages/subscription_manager/plugin/ostree/config.py", line 121, in save\n super(KeyFileConfigParser, self).save()\n File "/usr/lib64/python3.6/site-packages/rhsm/config.py", line 138, in save\n mode = os.stat(self.config_file).st_mode\nFileNotFoundError: [Errno 2] No such file or directory: \'/etc/ostree/remotes.d/redhat.conf\'\n2020-08-21 02:18:31,694 [INFO] subscription-manager:198769:MainThread @managerlib.py:72 - Consumer created: ibm-x3650m4-01-vm-02.ibm2.lab.eng.bos.redhat.com (07de19de-a1e7-46de-a1a9-55b995de31d0)\n2020-08-21 02:18:37,512 [INFO] subscription-manager:198769:MainThread @entcertlib.py:131 - certs updated:\nTotal updates: 0\nFound (local) serial# []\nExpected (UEP) serial# []\nAdded (new)\n <NONE>\nDeleted (rogue):\n <NONE>\n2020-08-21 02:19:45,685 [WARNING] subscription-manager:198892:MainThread @cache.py:901 - Unable to get data for <class \'subscription_manager.cache.SyspurposeValidFieldsCache\'> using REST API: HTTP error (404 - Not Found): \n2020-08-21 02:19:45,685 [ERROR] subscription-manager:198892:MainThread @managercli.py:1363 - HTTP error (404 - Not Found): \nTraceback (most recent call last):\n File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1351, in _do_command\n self.set()\n File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1372, in set\n super(ServiceLevelCommand, self).set()\n File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 746, in set\n self._is_provided_value_valid(self.options.set)\n File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 711, in _is_provided_value_valid\n valid_fields = self._get_valid_fields()\n File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 681, in _get_valid_fields\n valid_fields = get_syspurpose_valid_fields(uep=self.cp, identity=self.identity)\n File "/usr/lib64/python3.6/site-packages/subscription_manager/syspurposelib.py", line 161, in get_syspurpose_valid_fields\n syspurpose_valid_fields = cache.read_data(uep, identity)\n File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 905, in read_data\n raise rest_err\n File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 899, in read_data\n current_data = self._sync_with_server(uep=uep, consumer_uuid=identity.uuid)\n File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 929, in _sync_with_server\n data = uep.getOwnerSyspurposeValidFields(owner[\'key\'])\n File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 1264, in getOwnerSyspurposeValidFields\n return self.conn.request_get(method)\n File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 880, in request_get\n return self._request("GET", method, headers=headers, cert_key_pairs=cert_key_pairs)\n File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 906, in _request\n info=info, headers=headers, cert_key_pairs=cert_key_pairs)\n File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 765, in _request\n self.validateResponse(result, request_type, handler)\n File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 839, in validateResponse\n raise RestlibException(response[\'status\'], error_msg, response.get(\'headers\'))\nrhsm.connection.RestlibException: HTTP error (404 - Not Found): \n2020-08-21 02:19:45,689 [ERROR] subscription-manager:198892:MainThread @managercli.py:1364 - Error: Unable to retrieve service levels: HTTP error (404 - Not Found): \n\n\n*Actual results:*\nAs step 3, subscription-manager can not set service level.\nAs step 4, an error happens when trying to set service level: "Unable to retrieve service levels: HTTP error (404 - Not Found)"\n\n*Expected results:*\nService level should be set by subscription-manager successfully, and there should not be any error in rhsm.log\n\n*Additional info:*'

Associated revisions

Revision 4173dec5 (diff)
Added by Jonathon Turel 3 months ago

Fixes #30749 - Add /owners/:id/system_purpose to Candlepin Proxies Controller

History

#1 Updated by Jonathon Turel 3 months ago

  • Target version set to Katello 3.16.1
  • Subject changed from b'managercli.py:1364 - Error: Unable to retrieve service levels: HTTP error (404 - Not Found)' to Add /owners/:id/system_purpose to RHSM Proxies Controller

#2 Updated by The Foreman Bot 3 months ago

  • Assignee set to Jonathon Turel
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8916 added

#3 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases Katello 4.0.0 added

#4 Updated by Jonathon Turel 3 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Chris Roberts 3 months ago

  • Triaged changed from No to Yes
  • Fixed in Releases Katello 3.16.1 added
  • Fixed in Releases deleted (Katello 4.0.0)

Also available in: Atom PDF