Bug 1703928

Summary: [RFE] Update auto-attach error message when executed against org_environment(golden ticket) enabled org
Product: Red Hat Enterprise Linux 7 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED DUPLICATE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.7CC: wpoteat
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
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-10-06 14:01:23 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 Rehana 2019-04-29 07:05:57 UTC
Description of problem:

Observed that when manually tried to run auto-attach against the golden ticket enabled org , a error message “HTTP error code 400: Ignoring request to auto-attach. It is disabled for org "snowwhite". This error is misleading as the org snowwhite has auto-attached enabled 

# curl -k -u admin:admin "https://localhost:8443/candlepin/owners/snowwhite" | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   530    0   530    0     0   2791      0 --:--:-- --:--:-- --:--:--  2804
{
    "autobindDisabled": false,  --> autobind is not disabled

This bug is a request to modify the error message 

Version-Release number of selected component (if applicable):
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.0-1
subscription management rules: 5.36
subscription-manager: 1.24.4-1.el7

How reproducible:
Always

Steps to Reproduce:

1.Register against golden ticket enabled org (ex: snowwhite)
#subscription-manager register --activationkey=snowtestkey --org=snowwhite
The system has been registered with ID: 881ed4c8-ef1d-470c-93a9-b5c4204a5432
The registered system name is: hp-dl360pgen8-08.khw.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Awesome OS Server Bits
Status:       Not Subscribed


2.Try auto-attach
# subscription-manager attach --auto
HTTP error code 400: Ignoring request to auto-attach. It is disabled for org "snowwhite"


Actual results:
Message "HTTP error code 400: Ignoring request to auto-attach. It is disabled for org "snowwhite"" and no log entry in rhsm.log

Expected results:
Message should be more accurate as the auto-attach disablement was caused by the golden ticket mode

for ex: 
"Ignoring request to auto-attach. It is disabled for Organization with Content Access Mode set to Organization/Environment Access."


Additional info:

Comment 3 Rehana 2020-10-06 14:01:23 UTC
Closing the bug as a duplicate of Bug 1826300 . We are considering the bug 1826300 to be fixed and delivered in RHEL 7.9 Z Stream .

thanks,
Rehana

*** This bug has been marked as a duplicate of bug 1826300 ***