Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1884410 - misleading message referencing the contentAccessMode as a reason for not auto-attaching
Summary: misleading message referencing the contentAccessMode as a reason for not auto...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 3.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-01 21:21 UTC by John Sefler
Modified: 2020-11-20 14:58 UTC (History)
4 users (show)

Fixed In Version: candlepin-3.2.6-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-20 14:58:15 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin candlepin pull 2838 0 None open 1884410: Fix for misleading exception message in auto-attach (ENT-3128) 2020-11-10 11:15:29 UTC

Description John Sefler 2020-10-01 21:21:53 UTC
Description of problem:
When the "autobindDisabled" property of an org is set to false and the "contentAccessMode" is set to entitlement (not golden ticket/ not simple content access, not org_environment), and a subscription-manager client tries to auto-attach, then the client is presented with a misleading message....
   Ignoring request to auto-attach. It is disabled for org "12809278" because of the content access mode setting.

It should not be referencing the "content access mode setting" since the reason is simply because autobind is disabled.
Clearly there are multiple reasons why to ignore the auto-attach request, and in this case the reason displayed to the user is incorrect.
   


Version-Release number of selected component (if applicable):
[root@kvm-06-guest11 ~]# curl --stderr /dev/null -X GET -k -u stage_auto_testuser:REDACTED  -H "Content-Type: application/json" "https://subscription.rhsm.stage.redhat.com:443/subscription/status" |  python3 -m json.tool
{
    "mode": "NORMAL",
    "modeReason": null,
    "modeChangeTime": null,
    "result": true,
    "version": "3.1.18",
    "rulesVersion": "5.41",
    "release": "1",
    "standalone": false,
    "timeUTC": "2020-10-01T21:05:50+0000",
    "rulesSource": "default",
    "managerCapabilities": [
        "instance_multiplier",
        "derived_product",
        "vcpu",
        "cert_v3",
        "hypervisors_heartbeat",
        "remove_by_pool_id",
        "syspurpose",
        "insights_auto_register",
        "storage_band",
        "cores",
        "hypervisors_async",
        "org_level_content_access",
        "guest_limit",
        "ram",
        "batch_bind",
        "combined_reporting"
    ]
}


How reproducible:


Steps to Reproduce:
[root@kvm-06-guest11 ~]# curl --stderr /dev/null -X PUT -k -u stage_auto_testuser:REDACTED -d '{"autobindDisabled":"true"}' -H "Content-Type: application/json" "https://subscription.rhsm.stage.redhat.com:443/subscription/owners/12809278" | python3 -m json.tool
{
    "created": "2019-10-29T15:06:18+0000",
    "updated": "2020-10-01T21:09:04+0000",
    "id": "8a99f9ad6e16945a016e180da9d7000c",
    "key": "12809278",
    "displayName": "12809278",
    "parentOwner": null,
    "contentPrefix": null,
    "defaultServiceLevel": null,
    "upstreamConsumer": null,
    "logLevel": null,
    "autobindDisabled": true,                     <==== LOOK HERE
    "autobindHypervisorDisabled": false,
    "contentAccessMode": "entitlement",           <==== LOOK HERE
    "contentAccessModeList": "entitlement",       <==== LOOK HERE
    "lastRefreshed": "2020-09-22T16:19:46+0000",
    "href": "/owners/12809278"
}

[root@kvm-06-guest11 ~]# subscription-manager register  --username stage_auto_testuser --password REDACTED --force --serverurl=subscription.rhsm.stage.redhat.com --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 976f4a23-f796-4909-9f5a-11aba9c4c145
The registered system name is: kvm-06-guest11.hv2.lab.eng.bos.redhat.com
Ignoring request to auto-attach. It is disabled for org "12809278" because of the content access mode setting.  <==== LOOK HERE
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status:       Not Subscribed

Unable to find available subscriptions for all your installed products.

Actual results:
 as shown above...
 'Ignoring request to auto-attach. It is disabled for org "12809278" because of the content access mode setting.'


Expected results:
 something more like...
 'Ignoring request to auto-attach. It is disabled for org "12809278"'


Additional info:

Comment 1 John Sefler 2020-10-02 15:57:01 UTC
(In reply to John Sefler from comment #0)
> Expected results:
>  'Ignoring request to auto-attach. It is disabled for org "12809278".'

I believe this is the correctly punctuated expected result from commit 0d5fefcfa8c1c2485921d2dee6633879b1e06931


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