Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1978111

Summary: 'The service-level command is not supported by the server.' when list available service-level with Credentials on a unregistered RHEL9.0
Product: Red Hat Satellite Reporter: qianzhan
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED MIGRATED QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: bbuckingham, dsynk, lufu, nmoumoul, redakkan, yanpliu
Target Milestone: UnspecifiedKeywords: MigratedToJIRA, Regression, Triaged
Target Release: Unused   
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: 2024-06-06 01:01:41 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:

Description qianzhan 2021-07-01 07:09:05 UTC
Description of problem:
'The service-level command is not supported by the server.' when list available service-level with Credentials on a unregistered RHEL9.0

Version-Release number of selected component (if applicable):
candlepin-4.0.5-1.el7sat.noarch
subscription-manager: 1.29.15-1.el9

How reproducible:
always

Steps to Reproduce:
1. List available service-level by 'subscription-manager syspurpose' on a unregistered RHEL9.0:

[root@kvm-07-guest01 ~]# subscription-manager  identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.


[root@kvm-07-guest01 ~]# subscription-manager  syspurpose service-level --list --username=admin --password=admin --org=Default_Organization
Error: The service-level command is not supported by the server.

2. Check rhsm.log:
[root@kvm-07-guest01 ~]# tail -f /var/log/rhsm/rhsm.log
2021-07-01 02:41:22,572 [ERROR] subscription-manager:13434:MainThread @connection.py:827 - Response: 404
2021-07-01 02:41:22,573 [ERROR] subscription-manager:13434:MainThread @connection.py:828 - JSON parsing error: Expecting ':' delimiter: line 1 column 11 (char 10)


Actual results:

As step 1, error happened when list available service-level from Sat6.10.

Expected results:
the service-level values should be listed.

Additional info:

Comment 1 Rehana 2021-07-01 13:41:31 UTC
Hi , 

Can you please share additional details 

1. Please execute the same commands after setting the environment variables described here https://www.candlepinproject.org/docs/subscription-manager/debug_http_traffic.html#sts=Debug%20Environment%C2%A0Variables
 
and please share the outputs 

2. Please let us know if the existing command ` subscription-manager service-level --list --username=admin --password=admin --org=Default_Organization ` works against the same server or not.  


thanks,
Rehana

Comment 2 qianzhan 2021-07-02 01:47:15 UTC
(In reply to Rehana from comment #1)
> Hi , 
> 
> Can you please share additional details 
> 
> 1. Please execute the same commands after setting the environment variables
> described here
> https://www.candlepinproject.org/docs/subscription-manager/
> debug_http_traffic.html#sts=Debug%20Environment%C2%A0Variables
>  
> and please share the outputs 
> 
> 2. Please let us know if the existing command ` subscription-manager
> service-level --list --username=admin --password=admin
> --org=Default_Organization ` works against the same server or not.  
> 
> 
> thanks,
> Rehana

Hi, Please check the following:

1.

[root@kvm-07-guest01 ~]# subscription-manager  syspurpose service-level --list --username=admin --password=admin --org=Default_Organization

Making request: ent-01-vm-02.lab.eng.nay.redhat.com:443 GET /rhsm/owners/Default_Organization/servicelevels {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.15-1.el9', 'X-Correlation-ID': '77f947bf7c9a4f9692ee476023a98d9f', 'Authorization': 'Basic YWRtaW46YWRtaW4=', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.15-1.el9', 'Content-Length': '0'}

404 {'Date': 'Fri, 02 Jul 2021 01:44:29 GMT', 'Server': 'Apache', 'Foreman_version': '2.5.0', 'Foreman_api_version': '2', 'Foreman_current_organization': '; ANY', 'Foreman_current_location': '; ANY', 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', 'X-Request-Id': '2a0b5c0c-c954-4b95-a727-ce9e48c0d799', 'X-Runtime': '0.322852', 'Strict-Transport-Security': 'max-age=631139040; includeSubdomains', 'X-Frame-Options': 'sameorigin', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Download-Options': 'noopen', 'X-Permitted-Cross-Domain-Policies': 'none', 'Content-Security-Policy': "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data:; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'", 'Set-Cookie': '_session_id=9a43c2dc584dce79e0e4a290fec4761f; path=/; secure; HttpOnly; SameSite=Lax', 'Via': '1.1 ent-01-vm-02.lab.eng.nay.redhat.com', 'Transfer-Encoding': 'chunked'}
{"message"=>"Organization with id Default_Organization not found", "displayMessage"=>"Organization with id Default_Organization not found"}

Error: The service-level command is not supported by the server.

2.

[root@kvm-07-guest01 ~]# subscription-manager service-level --list --username=admin --password=admin --org=Default_Organization

Making request: ent-01-vm-02.lab.eng.nay.redhat.com:443 GET /rhsm/owners/Default_Organization/servicelevels {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.15-1.el9', 'X-Correlation-ID': '2f6317f5a2544e32a095f9efcf551439', 'Authorization': 'Basic YWRtaW46YWRtaW4=', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.15-1.el9', 'Content-Length': '0'}

404 {'Date': 'Fri, 02 Jul 2021 01:44:54 GMT', 'Server': 'Apache', 'Foreman_version': '2.5.0', 'Foreman_api_version': '2', 'Foreman_current_organization': '; ANY', 'Foreman_current_location': '; ANY', 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', 'X-Request-Id': '48ebe2b0-28ee-4c83-99fa-268ccf7e7ec2', 'X-Runtime': '0.332786', 'Strict-Transport-Security': 'max-age=631139040; includeSubdomains', 'X-Frame-Options': 'sameorigin', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Download-Options': 'noopen', 'X-Permitted-Cross-Domain-Policies': 'none', 'Content-Security-Policy': "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data:; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'", 'Set-Cookie': '_session_id=2eeb782e380b6d2b0e2b8f31e2b68592; path=/; secure; HttpOnly; SameSite=Lax', 'Via': '1.1 ent-01-vm-02.lab.eng.nay.redhat.com', 'Transfer-Encoding': 'chunked'}
{"message"=>"Organization with id Default_Organization not found", "displayMessage"=>"Organization with id Default_Organization not found"}

Error: The service-level command is not supported by the server.

Comment 4 Rehana 2021-07-02 12:23:54 UTC
*** Bug 1978101 has been marked as a duplicate of this bug. ***

Comment 7 William Poteat 2021-07-07 17:50:28 UTC
This is not parseable json. When I make this call against candlepin-3.0-HOTFIX I get actual json:

{"displayMessage" : "Organization with id Default_Organization could not be found.",  "requestUuid" : "9cb79f6f-f655-45c7-a1a9-0278a699a2da"}

But against this version [candlepin-4.0.5] I get:

{"message"=>"Organization with id Default_Organization not found", "displayMessage"=>"Organization with id Default_Organization not found"}

this is not parsable json.


I assume that this is something that is happening at the server. I do not know why this has changed.

Moving to Candlepin for investigation

Comment 12 Jonathon Turel 2021-07-13 19:03:51 UTC
This is indeed a regression in 6.10 - adding it to our sprint!

Comment 16 Jonathon Turel 2021-09-03 14:08:17 UTC
Removing sat-6.10.0 since this isn't a regression in 6.10

Comment 19 qianzhan 2022-05-31 07:11:20 UTC
*** Bug 2027589 has been marked as a duplicate of this bug. ***

Comment 20 qianzhan 2022-09-06 06:05:59 UTC
This bug exists on Satellite6.12 snap 9.0.

Comment 21 Brad Buckingham 2023-01-04 22:48:23 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 22 qianzhan 2023-01-05 06:43:55 UTC
Hi Brad,

Thanks for your notice. This bug is one of the test cases in RHSM integration testing against Satellite6. I would like to confirm with you:
1. You mean this bug is not an important feature of Satellite after the satellite team’s review? 
2. Will this bug be closed as WONTFIX? If not WONTFIX, I need to open a new bug to track this issue after this bug is closed.

Comment 24 Brad Buckingham 2023-02-01 18:55:10 UTC
I've updated the bugzilla so that it remains open based upon comment 22.

Comment 25 qianzhan 2023-05-26 04:16:48 UTC
This bug exists on Satellite6.13.

Comment 26 qianzhan 2023-07-25 09:53:49 UTC
This bug exists on Satellite6.14.

Comment 27 qianzhan 2024-01-19 03:50:38 UTC
This bug exists on Satellite6.15.

Comment 28 Eric Helms 2024-06-06 01:01:41 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.