Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
When the following is run...
% subscription-manager register --force --username=usera --password=something
...the API is hit to get the owners (aka organizations) for the user. If there is just one org, then it is passed as a parameter to the API registering the system. If the user belongs to more than one, then the param is omitted.
This causes problems with katello/headpin: If an org is specified, then the one environment for that org is used as the destination for the system. Of course if there is more than one environment in the organization, then an error is returned to sub-mgr and the command fails.
This defeats the purpose of having a default organization and environment for the user: Since no org was explicitly specified on the sub-mgr command line, it is implied that the default org/env be used to register the system.
Of course I can put in code like, "If org is specified and it matches the default org for the user and the user belongs to only one org, then use the default env. Otherwise use the environment of that org but only if it has one environment."
So... Should sub-mgr really be passing an owner parameter when none was specified on the command line? Shouldn't the receiving API (be it candlepin or katello) determine the behavior?
Your thoughts (in a timely manner) much appreciated!
Tom
After discussion with Tom, this would be easier to fix in Katello than in sub-mgr, so we don't have to break backwards compatibility with older versions of sub-mgr. Moving product to cfse.
When the following is run... % subscription-manager register --force --username=usera --password=something ...the API is hit to get the owners (aka organizations) for the user. If there is just one org, then it is passed as a parameter to the API registering the system. If the user belongs to more than one, then the param is omitted. This causes problems with katello/headpin: If an org is specified, then the one environment for that org is used as the destination for the system. Of course if there is more than one environment in the organization, then an error is returned to sub-mgr and the command fails. This defeats the purpose of having a default organization and environment for the user: Since no org was explicitly specified on the sub-mgr command line, it is implied that the default org/env be used to register the system. Of course I can put in code like, "If org is specified and it matches the default org for the user and the user belongs to only one org, then use the default env. Otherwise use the environment of that org but only if it has one environment." So... Should sub-mgr really be passing an owner parameter when none was specified on the command line? Shouldn't the receiving API (be it candlepin or katello) determine the behavior? Your thoughts (in a timely manner) much appreciated! Tom