RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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.
Bug 2142797 - It is not possible to connect RHSM, when user is member of more organizations
Summary: It is not possible to connect RHSM, when user is member of more organizations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhc
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Pavol Kotvan
URL:
Whiteboard: SCRUB_20221128
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-15 10:14 UTC by Jiri Hnidek
Modified: 2023-11-07 10:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:36:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github RedHatInsights rhc pull 20 0 None Merged feat: Big refactoring of main.go 2023-08-22 09:38:25 UTC
Github RedHatInsights rhc pull 24 0 None Merged feat: Ask for org during registration of system 2023-08-22 09:38:07 UTC
Red Hat Issue Tracker RHELPLAN-139373 0 None None None 2022-11-15 11:09:11 UTC
Red Hat Product Errata RHBA-2023:6541 0 None None None 2023-11-07 08:37:03 UTC

Description Jiri Hnidek 2022-11-15 10:14:45 UTC
Description of problem:
When you try to register system using rhc CLI tool, then it is not possible to register the system, when user is member of more organizations. It is not possible to specify the organization using CLI option. The rhc CLI tool do not ask for organization too.

Version-Release number of selected component (if applicable):
[root@rhel9 ~]# rhc --version
rhc version 0.2.1

How reproducible:
100%

Steps to Reproduce:
1. Create account that is member of more than one organization (I use locally deployed candlepin server with testing data)
2. Try to register system using rhc CLI tool:

[root@rhel9 ~]# rhc connect --username admin --password admin
Connecting rhel9 to Red Hat.
This might take a few seconds.

info: User admin is member of more organizations, but no organization was selected
[root@rhel9 ~]# rhc connect --username admin --password admin --organization admin
Connecting rhel9 to Red Hat.
This might take a few seconds.

error: Error: Missing username or password.


Actual results:
As you can see the current situation does not allow to register system using rhc and error messages printed to console are little bit confusing.

Expected results:
It should be possible to specify organization using CLI option --organization. When --username and --password are not specified, then rhc should not ask only for username and password, but it should also ask for organization, when user is member of more than one organization (rhc should display list of available organization)

Additional info:
This issue has been partially fixed in this PR: https://github.com/RedHatInsights/rhc/pull/20 (it is possible to specify organization using --organization CLI option)

Comment 1 Jiri Hnidek 2022-11-15 10:18:25 UTC
When username and password is not specified using CLI option, then this issue looks like this:

[root@rhel9 ~]# rhc connect
Connecting rhel9 to Red Hat.
This might take a few seconds.

Username: admin
Password: 

info: User admin is member of more organizations, but no organization was selected

As you can see rhc does not ask for organization in this case at all.

BTW: When Satellite is used for registration, then user can be also member of some environments and it is not possible to specify environments too.

Comment 2 Jan Stavel 2023-05-19 17:14:38 UTC
     Beaker Test information:
                         HOSTNAME=opicee-5.4a2m.lab.eng.bos.redhat.com
                            JOBID=7866551
                         RECIPEID=13926242
                    RESULT_SERVER=
                           DISTRO=RHEL-9.3.0-updates-20230519.d.24
                     ARCHITECTURE=x86_64

      Job Whiteboard: Reserve Workflow provision of distro None on any system for 345600 seconds

      Recipe Whiteboard: 
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **

[root@opicee-5 ~]# rhc connect

Connecting ..............................redhat.com to Red Hat.
This might take a few seconds.

Username: testuser1
Password: 

Available Organizations:
snowwhite  admin
Organization: snowwhite

● Connected to Red Hat Subscription Management
! Cannot connect to Red Hat Insights
● Activated the Remote Host Configuration daemon

Comment 3 Jan Stavel 2023-05-19 18:04:28 UTC
    Beaker Test information:
                         HOSTNAME=sweetpig-12.4a2m.lab.eng.bos.redhat.com
                            JOBID=7868103
                         RECIPEID=13928790
                    RESULT_SERVER=
                           DISTRO=RHEL-8.9.0-updates-20230519.d.28
                     ARCHITECTURE=x86_64

      Job Whiteboard: Reserve Workflow provision of distro None on any system for 86400 seconds

      Recipe Whiteboard: 
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
[root@sweetpig-12 ~]# rhc connect
Connecting sweetpig-12.4a2m.lab.eng.bos.redhat.com to Red Hat.
This might take a few seconds.

Username: testuser1
Password: 

Available Organizations:
snowwhite  admin
Organization: snowwhite

● Connected to Red Hat Subscription Management
! Cannot connect to Red Hat Insights
● Activated the Remote Host Configuration daemon

Manage your connected systems: https://red.ht/connector

Comment 6 errata-xmlrpc 2023-11-07 08:36:45 UTC
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 (rhc bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6541


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