Bug 761710
Summary: | Registration fails if Organization has multiple environments | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Og Maciel <omaciel> |
Component: | katello-agent | Assignee: | Tom McKay <tomckay> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Garik Khachikyan <gkhachik> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.0 | CC: | bkearney, gkhachik, mkoci |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-22 18:11:48 UTC | Type: | --- |
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: | 747354 |
Description
Og Maciel
2011-12-08 20:40:57 UTC
commit f5384c97649530829140ea3567b9ac0267239f66 Merge: db2a027 a0c0230 Author: Tom McKay <thomasmckay> Date: Fri Dec 9 09:22:04 2011 -0500 The cause of this error was due to the user's default org/env was not being used. To reproduce, simply omit the --org and --environment arguments when using subscription-manager to register. Still broken when the org has multiple environments. commit a1f7cba138dcaa1636a1ab07616194e39e3dc876 Author: Tom McKay <thomasmckay> Date: Fri Dec 16 09:32:53 2011 -0500 Bug 761710 - Registration fails if Organization has multiple environments https://bugzilla.redhat.com/show_bug.cgi?id=761710 + Comment from code... # Some subscription-managers will call /users/$user/owners to retrieve the orgs that a user belongs to. # Then, If there is just one org, that will be passed to the POST /api/consumers as the owner. To handle # this scenario, if the org passed in matches the user's default org, use the default env. If not use # the single env of the org or throw an error if more than one. # VERIFIED Following cases are checked: 1. for a user_org1 is assigned the default org: org1 (has one env. only) 2. for a user_org1 there is no default org 3. for a user_org1 there is providing the org=org1 (but there is getting created one more env.) results: 1. providing no --org & --environment options works. System get registered to the org1 and its default env (let's say: Base) 2. without providing env and org options fails: --> You have not set a default organization and environment on the user user_org1. So providing --org=org1 option works (as org1 still have one "default" env and its beeing used) 3. creating another env: Test brings the command to fail (subscription-manager register --username user_org1 --password <masked> --org=org1) --> Organization org1 has more than one environment. Please specify target environment for system registration. So providing --environment=Base does the thing. checked against: katello-0.1.174-2.el6.noarch katello-cli-0.1.35-1.el6.noarch pulp-0.0.256-1.el6.noarch candlepin-0.5.8-1.el6.noarch subscription-manager-0.98.3-1.el6.x86_64 |