Bug 767977 - 'owner' param should not be sent during register unless specified
Summary: 'owner' param should not be sent during register unless specified
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-15 12:57 UTC by Tom McKay
Modified: 2014-09-18 16:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-10 12:30:53 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Tom McKay 2011-12-15 12:57:44 UTC
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

Comment 2 Chris Duryee 2012-03-22 17:56:52 UTC
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.

Comment 3 Tom McKay 2012-09-10 12:30:53 UTC
Leaving functionality as is.


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