Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1753236

Summary: Cockpit plugin: when Organization is not specified, then error is displayed
Product: Red Hat Enterprise Linux 8 Reporter: Jiri Hnidek <jhnidek>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 8.1CC: anilsson, csnyder, jsefler, khowell, mcatanza, mramendi, redakkan, skallesh, swick
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1772582 (view as bug list) Environment:
Last Closed: 2021-05-18 13:32:41 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: 1772582    
Attachments:
Description Flags
Error in registration dialog, when nor org is specified
none
You must specify organization for new units
none
Username and password details
none
successful registration
none
Username and password details
none
successful registration
none
Username and password details
none
Successful registration of the final verification none

Description Jiri Hnidek 2019-09-18 13:06:48 UTC
Created attachment 1616221 [details]
Error in registration dialog, when nor org is specified

Description of problem:
When you try to register system using subscription-manager cockpit plugin, then it is not enough to type username and password, when you register against default candlepin server (subscription.rhsm.redhat.com). You have to also type organization despite subscription-manager CLI doesn't require to type organization.

Version-Release number of selected component (if applicable):

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.5-1
subscription management rules: 5.37
subscription-manager: RPM_VERSION

How reproducible:
100%

Steps to Reproduce:
1. Open cockpit page: https://<ip_of_your_rhel8_system>:9090
2. Click on Subscriptions
3. Click on Register button
4. Type correct username and password in registration dialog
5. Click on register button in registration dialog

Actual results:
- Following error is displayed in registration dialog: "You must specify an organization for new units." (look at attachment).
- System is registered (but not auto-attached) at this point and it is possible to close registration dialog using Cancel button, but it is very confusing!

Expected results:
- No error is printed, when user is member of one organization (similar behavior in subscription-manager CLI or GUI)
- user can select from available organizations (similar behavior in subscription-manager GUI)

Additional info:
When you get list of available organization using:

[root@localhost ~]# subscription-manager orgs --username jhnidek --password secret
+-------------------------------------------+
          jhnidek Organizations
+-------------------------------------------+

Name: 1234567
Key:  1234567

And you use the name of organization (1234567) in registration dialog, then no error is displayed too.

Comment 1 Kevin Howell 2019-11-14 16:46:38 UTC
Let's use this BZ to handle when the user has only a single org.

Comment 3 Chris Snyder 2020-02-10 16:25:09 UTC
*** Bug 1796916 has been marked as a duplicate of this bug. ***

Comment 4 Rehana 2020-04-01 09:06:37 UTC
*** Bug 1704670 has been marked as a duplicate of this bug. ***

Comment 7 Shwetha Kallesh 2020-09-30 10:13:04 UTC
Created attachment 1717816 [details]
You must specify organization for new units

reproducer:

[root@ibm-x3650m4-01-vm-16 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.18-1
subscription management rules: 5.41
subscription-manager: 1.27.16-1.el8


1. open cockpit page, login with valid credentials

2. go to subscriptions tab

3. click on register button and try to register with user that belongs to only one org



results :

P.S the attachment

Comment 8 Shwetha Kallesh 2020-09-30 10:17:17 UTC
Early testing/verification comments:

[root@hpe-dl380pgen8-02-vm-5 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.21-1
subscription management rules: 5.41
subscription-manager: 1.28.3-1.git.10.32f43d9.el8

1. open cockpit page, login with valid credentials

2. go to subscriptions tab

3. click on register button and try to register with user that belongs to only one org

Result:
System got registered successfully

Please refer attachments:

1)Username and password details

2) successful registration

Comment 9 Shwetha Kallesh 2020-09-30 10:18:20 UTC
Created attachment 1717820 [details]
Username and password details

Comment 10 Shwetha Kallesh 2020-09-30 10:19:10 UTC
Created attachment 1717821 [details]
successful registration

Comment 12 Shwetha Kallesh 2020-11-03 10:14:09 UTC
Created attachment 1726184 [details]
Username and password details

Early verification comments:
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.5-1.el8


1. open cockpit page, login with valid credentials

2. go to subscriptions tab

3. click on register button and try to register with user that belongs to only one org

Result:
System got registered successfully

Please refer attachments:

1)Username and password details

2)Successful registration

Comment 13 Shwetha Kallesh 2020-11-03 10:14:59 UTC
Created attachment 1726185 [details]
successful registration

Comment 16 Shwetha Kallesh 2020-11-16 07:26:14 UTC
Created attachment 1729707 [details]
Username and password details

[root@ibm-x3650m4-01-vm-08 ~]# rpm -qa subscription-manager --changelog | grep 1753236
- 1753236: D-Bus Register properly, when org not specified; ENT-2096

[root@ibm-x3650m4-01-vm-08 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.5-1.el8


1. open cockpit page, login with valid credentials

2. go to subscriptions tab

3. click on register button and try to register with user that belongs to only one org

Result:
System got registered successfully

Please refer attachments:

1)Username and password details

2)Successful registration

Comment 17 Shwetha Kallesh 2020-11-16 07:27:01 UTC
Created attachment 1729708 [details]
Successful registration of the final verification

Comment 19 errata-xmlrpc 2021-05-18 13:32:41 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 (subscription-manager 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-2021:1575

Comment 20 Jan Stodola 2021-06-01 17:20:41 UTC
*** Bug 1965027 has been marked as a duplicate of this bug. ***