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 1268102

Summary: In subman-gui clicking the register button brings up a new registerDialog for each click (even if one is present)
Product: Red Hat Enterprise Linux 7 Reporter: Chris Snyder <csnyder>
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: high    
Version: 7.2CC: alikins, bcourt, crog, jmolet, lmiksik, skallesh, stoner
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 11:51:16 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:
Attachments:
Description Flags
multiple registration dialogs
none
No multiple register dialogs none

Description Chris Snyder 2015-10-01 20:18:59 UTC
Description of problem:
Subman gui allows more than one registerDialog to be present on the screen at a time.

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


How reproducible:
100% of the time


Steps to Reproduce:
1. Make sure the system is not registered to rhsm
2. Open subman-gui
3. click the 'Register' button on the main gui window
4. After the registerDialog pops up, press the same 'Register' button on the main gui again

Actual results:
two registerDialog windows pop up

Expected results:
One and only one registerDialog window pops up.
An alternative would be to make it impossible to press that same button again if a registerDialog already is shown.

Additional info:

Comment 2 John Sefler 2015-10-01 21:55:58 UTC
Created attachment 1079282 [details]
multiple registration dialogs

[root@jsefler-7 ~]# rpm -q subscription-manager-gui
subscription-manager-gui-1.15.9-13.el7.x86_64

Comment 3 John Sefler 2015-10-02 13:34:10 UTC
The same problem exists when clicking the "Auto-attach" button multiple times.

Comment 4 Adrian Likins 2015-10-02 17:48:22 UTC
There is a little complexity hidden in here.

Namely, managergui.MainWindow needs to track the RegisterDialog it creates in the normal approach, but RegisterDialog is not a Widget, so some of the destroy/hide stuff is off by a level.

(and some of the object lifetimes are a little complicated, since the dialogs can be hidden, destroy, or they 'finished').

Thinking it might be simplest to block the register button handler when
creating RegisterDialog, and connect to the 'finished' signal of the RegisterWidget in RegisterDialog (RegisterDialog.register_dialog.register_widget.register_widget... [2]

But maybe more idiomatic to add a 'finished' signal to RegisterDialog,
so that managergui.MainWindow would unblock on

[this is hard to explain, maybe I can just fix it...]


[1] RegisterDialog and it's sub class AutoAttachDialog

[2] why? RegisterDialog/RegisterWidget are python classes and GObjects, but are not Gtk.Widget subclasses directly, mostly due to the way the Gtk.Builder() object works [ie, it's a wrapper widget to the actual top level widget from the glade its created from]

Comment 5 Adrian Likins 2015-10-02 19:47:25 UTC
Another note... the 'Register' menu item can also launch register dialog
(and the two are intertwingled in main_window/installedtab).

Comment 8 Chris Snyder 2015-10-06 14:19:14 UTC
commit 9208977432d286f79d7f470cb06810063390e564
Author: Adrian Likins <alikins>
Date:   Fri Oct 2 18:22:19 2015 -0400

    Use class methods instead of redundant ad-hoc methods.

commit c4a118b11a2e832ff65c8c92df75bc5fffdfa367
Author: Alex Wood <awood>
Date:   Fri Oct 2 15:02:05 2015 -0400

    1268102: Stop main window from opening duplicate dialogs.


In upstream master as of the two commits listed above.

Comment 12 Sean Toner 2015-10-12 11:39:52 UTC
Once I clicked the Register button, it became inactive and I was unable to bring up any other register dialogs.

[root@dhcp129-49 ~]# rpm -qa | grep subscription
subscription-manager-1.15.9-14.el7.x86_64
subscription-manager-gui-1.15.9-14.el7.x86_64
subscription-manager-initial-setup-addon-1.15.9-14.el7.x86_64

Comment 13 Shwetha Kallesh 2015-10-12 12:28:28 UTC
Created attachment 1081992 [details]
No multiple register dialogs

Marking verified as I dont see multiple dialogs neither while registering nor auto-attaching .

[root@dhcp35-36 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.0.6-1
subscription management rules: 5.17
subscription-manager: 1.15.9-14.el7
python-rhsm: 1.15.4-5.el7

Comment 14 errata-xmlrpc 2015-11-19 11:51:16 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, 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://rhn.redhat.com/errata/RHBA-2015-2122.html