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 1496550 - subscription-manager successfully registers as type=RHUI despite RHUI's absence from candlepin's response from /consumertypes
Summary: subscription-manager successfully registers as type=RHUI despite RHUI's absen...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 2.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-27 17:58 UTC by John Sefler
Modified: 2018-04-10 18:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 18:31:40 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1554482 0 urgent CLOSED subscription-manager register --type=RHUI fails to pass the consumer type to Candlepin 2021-02-22 00:41:40 UTC

Internal Links: 1554482

Description John Sefler 2017-09-27 17:58:57 UTC
Description of problem:
Due to recent changes from Bug 1455361 Bug 1461003 and Bug 1485008, the ability to register as type RHUI has changed and it is now unclear what the expected results should be when registering to a candlepin server that does not include "RHUI" from the response to candlepin's API to /consumertypes 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel7 ~]# curl --insecure --user REDACTED:REDACTED --stderr /dev/null --request GET https://jsefler-candlepin.usersys.redhat.com:8443/candlepin/consumertypes | python -mjson.tool
[
    {
        "id": "1000",
        "label": "system",
        "manifest": false
    },
    {
        "id": "1001",
        "label": "person",
        "manifest": false
    },
    {
        "id": "1002",
        "label": "domain",
        "manifest": false
    },
    {
        "id": "1003",
        "label": "candlepin",
        "manifest": true
    },
    {
        "id": "1004",
        "label": "hypervisor",
        "manifest": false
    },
    {
        "id": "1006",
        "label": "headpin",
        "manifest": true
    },
    {
        "id": "1007",
        "label": "katello",
        "manifest": true
    },
    {
        "id": "1008",
        "label": "share",
        "manifest": false
    }
]
[root@jsefler-rhel7 ~]# subscription-manager register --serverurl=https://jsefler-candlepin.usersys.redhat.com:8443/candlepin --user=testuser1 --org=admin --type=RHUI
Registering to: jsefler-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with ID: c7bfd6eb-28b4-4400-849c-c78d42856e8a
The registered system name is: jsefler-rhel7.usersys.redhat.com
[root@jsefler-rhel7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.1.1-1
subscription management rules: 5.25
subscription-manager: 1.20.1-1.git.64.ce23c12.el7
python-rhsm: 1.20.1-1.git.42.ce23c12.el7
[root@jsefler-rhel7 ~]# 


Actual results:
  Notice above that we can successfully register as type=RHUI despite the response from candlepin's /consumertypes does not include RHUI.


Expected results "Unit type 'RHUI' could not be found."

-----------------------------------------

For comparison, here are the results from the current staged candlepin where RHUI is among the consumer types...

[root@jsefler-rhel7 ~]# subscription-manager unregister
Unregistering from: jsefler-candlepin.usersys.redhat.com:8443/candlepin
System has been unregistered.
[root@jsefler-rhel7 ~]# curl --insecure --user REDACTED:REDACTED  -stderr /dev/null --request GET http://candlepin.dist.stage.ext.phx2.redhat.com/candlepin/consumertypes | python -mjson.tool
[
    {
        "id": "0",
        "label": "system",
        "manifest": false
    },
    {
        "id": "1",
        "label": "person",
        "manifest": false
    },
    {
        "id": "2",
        "label": "candlepin",
        "manifest": false
    },
    {
        "id": "3",
        "label": "domain",
        "manifest": false
    },
    {
        "id": "4",
        "label": "RHUI",
        "manifest": false
    },
    {
        "id": "5",
        "label": "sam",
        "manifest": true
    },
    {
        "id": "6",
        "label": "hypervisor",
        "manifest": false
    },
    {
        "id": "9",
        "label": "satellite",
        "manifest": true
    }
]
[root@jsefler-rhel7 ~]# subscription-manager register --serverurl=http://subscription.rhsm.stage.redhat.com:443/subscription/ --user=qa@redhat.com  --type=RHUI
Registering to: subscription.rhsm.stage.redhat.com:443/subscription/
Password: 
The system has been registered with ID: 991f1483-6883-4e9e-bbd5-01a9e7283463
The registered system name is: jsefler-rhel7.usersys.redhat.com
[root@jsefler-rhel7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.40-1
subscription management rules: 5.24.1
subscription-manager: 1.20.1-1.git.64.ce23c12.el7
python-rhsm: 1.20.1-1.git.42.ce23c12.el7


Actual and expected results:
  Notice above that we can successfully register as type=RHUI and that the response from candlepin's /consumertypes does indeed include RHUI.

Comment 4 John Sefler 2018-04-10 18:31:40 UTC
Moving to CLOSED CURRENTRELEASE SINCE IT IS WORKING IN 2.3.5-1

[root@jsefler-rhel6 ~]# curl --insecure --user REDACTED:REDACTED --stderr /dev/null --request GET https://jsefler-candlepin.usersys.redhat.com:8443/candlepin/consumertypes | python -mjson.tool
[
    {
        "id": "1000", 
        "label": "system", 
        "manifest": false
    }, 
    {
        "id": "1001", 
        "label": "person", 
        "manifest": false
    }, 
    {
        "id": "1002", 
        "label": "domain", 
        "manifest": false
    }, 
    {
        "id": "1003", 
        "label": "candlepin", 
        "manifest": true
    }, 
    {
        "id": "1004", 
        "label": "hypervisor", 
        "manifest": false
    }, 
    {
        "id": "1006", 
        "label": "headpin", 
        "manifest": true
    }, 
    {
        "id": "1007", 
        "label": "katello", 
        "manifest": true
    }, 
    {
        "id": "1008", 
        "label": "share", 
        "manifest": false
    }
]

[root@jsefler-rhel6 ~]# subscription-manager register --serverurl=https://jsefler-candlepin.usersys.redhat.com:8443/candlepin --user=testuser1 --org=admin --type=RHUI
Registering to: jsefler-candlepin.usersys.redhat.com:8443/candlepin
Password: 
Invalid unit type: RHUI

[root@jsefler-rhel6 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.3.5-1
subscription management rules: 5.26
subscription-manager: 1.20.10-3.el6


VERIFIED: "Invalid unit type: RHUI" when it is absent from /candlepin/consumertypes


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