Bug 820294
| Summary: | rhsm knows what org i want to register until i specify the environment | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Justin Sherrill <jsherril> |
| Component: | subscription-manager | Assignee: | Bryan Kearney <bkearney> |
| Status: | CLOSED ERRATA | QA Contact: | Entitlement Bugs <entitlement-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.9 | CC: | awood, bkearney, jmolet, jsefler, mstead |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-01-08 03:52:26 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 771748 | ||
|
Description
Justin Sherrill
2012-05-09 14:32:32 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release. Fixed in 1.0.3, a248729 Testing against:
python-rhsm-1.0.2-1.git.2.d5c3d05.el5
subscription-manager-1.0.4-1.git.1.b28337e.el5
CloudForms System Engine Version: 0.1.317-1.el6_2
=======================================================
## SHOWS THAT THERE IS ONE ORG
[root@jmolet-vm0 ~]# subscription-manager orgs
Username: testuser
Password:
+-------------------------------------------+
testuser Organizations
+-------------------------------------------+
Name: Rome
Key: Rome
## SHOWS THAT THERE ARE MULTIPLE ENVIRONMENTS
[root@jmolet-vm0 ~]# subscription-manager environments --org=Rome
Username: testuser
Password:
+-------------------------------------------+
Environments
+-------------------------------------------+
Name: Development
Description:
Name: QA
Description:
Name: Release
Description:
[root@jmolet-vm0 ~]# subscription-manager register --user testuser --pass password --environment=QA
Must specify owner key to query environment by name
^^ Better error message, but still not the desired result. Setting back to NEW
It works for me. check it out:
[jbowes@pipboy subscription-manager]$ sudo env PYTHONPATH=../python-rhsm/src:src/ bin/subscription-manager orgs
Username: jbowes
Password:
+-------------------------------------------+
jbowes Organizations
+-------------------------------------------+
Name: jbowes
Key: jbowes
[jbowes@pipboy subscription-manager]$ sudo env PYTHONPATH=../python-rhsm/src:src/ bin/subscription-manager environments --org jbowes
Username: jbowes
Password:
+-------------------------------------------+
Environments
+-------------------------------------------+
Name: dev
Description:
Name: qa
Description:
[jbowes@pipboy subscription-manager]$ sudo env PYTHONPATH=../python-rhsm/src:src/ bin/subscription-manager register --user jbowes --pass jbowes --environment qa
Validation failed: Name has already been taken
[jbowes@pipboy subscription-manager]$ sudo env PYTHONPATH=../python-rhsm/src:src/ bin/subscription-manager register --user jbowes --pass jbowes --environment qa
The system has been registered with id: c204c89d-54ca-424d-ba36-2bf2bcbc3541
any idea what might be different? otherwise, maybe you can retest. it could have been a bug in katello's returned results for org list.
Verifying Version... [root@rhsm-accept-rhel5 ~]# rpm -q python-rhsm subscription-manager python-rhsm-1.0.8-1.el5 subscription-manager-1.0.18-1.el5 CloudForms System Engine Version: 1.1.12-7.el6cf Prep work... Using the katello gui, user jsefler was created in single org Starbucks with access to environment Demi Using KATELLO_HOSTNAME=qetello02.usersys.redhat.com I installed the package to install the katello ca cert and configure the rhsm.conf as instructed in comment 5 Testing with user admin who has access to multiple orgs with multiple environments... [root@rhsm-accept-rhel5 ~]# subscription-manager register --username admin Password: You have not set a default organization and environment on the user admin. [root@rhsm-accept-rhel5 ~]# subscription-manager orgs --username admin Password: +-------------------------------------------+ admin Organizations +-------------------------------------------+ Name: Starbucks Key: Starbucks Name: Lenovo Key: Lenovo Name: AlphabetSoup Key: AlphabetSoup Name: QE Key: QE Name: ACME_Corporation Key: ACME_Corporation [root@rhsm-accept-rhel5 ~]# subscription-manager register --username admin --org QE Password: Organization QE has more than one environment. Please specify target environment for system registration. [root@rhsm-accept-rhel5 ~]# subscription-manager environments --username admin --org QE Password: +-------------------------------------------+ Environments +-------------------------------------------+ Name: GA Description: None Name: QE Description: None Name: DEV Description: None [root@rhsm-accept-rhel5 ~]# subscription-manager register --username admin --environment GA Password: Must specify owner key to query environment by name [root@rhsm-accept-rhel5 ~]# subscription-manager register --username admin --environment GA --org QE Password: The system has been registered with id: 2b2bb4df-680d-4d1b-a34a-d0ee6f4c1422 [root@rhsm-accept-rhel5 ~]# ^^^ ALL APPEARS TO BE PASSING Testing with user jsefler who has access to one org and one environment... [root@rhsm-accept-rhel5 ~]# subscription-manager register --username jsefler Password: The system has been registered with id: 087b2419-51c0-4783-9a18-6757485cdd7b [root@rhsm-accept-rhel5 ~]# [root@rhsm-accept-rhel5 ~]# subscription-manager orgs --username jsefler Password: +-------------------------------------------+ jsefler Organizations +-------------------------------------------+ Name: Starbucks Key: Starbucks [root@rhsm-accept-rhel5 ~]# subscription-manager environments --username jsefler Error: This command requires that you specify an organization with --org [root@rhsm-accept-rhel5 ~]# subscription-manager environments --username jsefler --org Starbucks Password: +-------------------------------------------+ Environments +-------------------------------------------+ Name: Venti Description: None Name: Grande Description: None Name: Demi Description: None [root@rhsm-accept-rhel5 ~]# ^^^ Notice that there are three environments under org Starbucks, yet user jsefler was able to register without specifying an environment. That was because user jsefler was only granted access to environment Demi. Testing again... [root@rhsm-accept-rhel5 ~]# subscription-manager unregister System has been un-registered. [root@rhsm-accept-rhel5 ~]# subscription-manager register --username jsefler --environment Venti Password: User jsefler is not allowed to access api/systems/create [root@rhsm-accept-rhel5 ~]# subscription-manager register --username jsefler --environment Grande Password: User jsefler is not allowed to access api/systems/create [root@rhsm-accept-rhel5 ~]# subscription-manager register --username jsefler --environment Demi Password: The system has been registered with id: 6a2c2668-35c3-4de8-8809-42f95068218e [root@rhsm-accept-rhel5 ~]# ^^^ ALL APPEARS TO BE PASSING Moving to VERIFIED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0033.html |