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 1242998

Summary: subscription-manager-initial-setup-addon does not recognize an already registered system
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Adrian Likins <alikins>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact: Lenka Špačková <lkuprova>
Priority: unspecified    
Version: 7.2CC: crog, lmiksik, pbokoc, stoner, vrjain
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
initial-setup allows re-registering When the initial-setup utility is run when the system has already been registered, the initial-setup GUI incorrectly reports that "System is not registered to RHSM". As a consequence, initial-setup allows the user to unnecessarily re-register. To work around this problem, ignore the notice and click "Finish configuration," or go through the registration process again.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 11:49:14 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: 1246125, 1259988, 1264318, 1266790    
Attachments:
Description Flags
System is not registered to RHSM
none
initial-setup on already registered system none

Description John Sefler 2015-07-14 14:21:57 UTC
Created attachment 1051871 [details]
System is not registered to RHSM

Description of problem:
It may be out of scope for the common use case of subscription-manager-initial-setup-addon, but I'll report it anyway...  If the system is already registered at the time that initial-setup is run, then the initial-setup GUI renders a string that states "System is not registered to RHSM" when I expected it to state "System is registered to RHSM".  See the attached screenshot.


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# rpm -q subscription-manager-initial-setup-addon
subscription-manager-initial-setup-addon-1.15.6-1.el7.x86_64

How reproducible:


Steps to Reproduce:
1.After provisioning a new system and running through the initial run of initial-setup.  Here's how we can re-launch it while already registered...

[root@jsefler-7 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscription --username qa --force
Password: 
The system has been registered with ID: fe10686e-67dc-4403-b891-dd2899e73e0a 
[root@jsefler-7 ~]# systemctl enable initial-setup-graphical.service
Created symlink from /etc/systemd/system/graphical.target.wants/initial-setup-graphical.service to /usr/lib/systemd/system/initial-setup-graphical.service.
[root@jsefler-7 ~]# reboot

Now when the system starts, you will see the attach screenshot showing "System is not registered to RHSM" which is not true.



Actual results:
"System is not registered to RHSM"

Expected results:
"System is registered to RHSM"

Additional info:

Comment 1 vritant 2015-09-08 21:34:57 UTC
*** Bug 1261177 has been marked as a duplicate of this bug. ***

Comment 3 Adrian Likins 2015-09-28 14:49:50 UTC
https://github.com/candlepin/subscription-manager/pull/1296
has fixes for this (it's part of initial-setup gui fixes)

Comment 4 Chris "Ceiu" Rog 2015-09-28 18:13:50 UTC
commit 44e1a74aa6c6bd2ccfa0ea3819b9177b684debcf
Author: Adrian Likins <alikins>
Date:   Thu Aug 27 14:22:15 2015 -0400

    1242998, 1254550: Fix "already reg'ed" in initial-setup
    
    Handle initial-setup running on a system that is potentially
    already registered and/or attached to subscriptions better.
    
    The RegisterWidget as used in initial-setup now detects
    if the system is already registered. Current behavior is
    to automatically move ahead to 'attach' stage of registration
    if needed, or to the done screen if already registered and
    attached.
    
    RegisterWidget now runs choose_initial_screen as an idle_add
    callback, so initial setup idle_add's it, then the callback
    decides which screen to immedidetly move to from
    initial_screen, and emit's signals to do it.
    
    Refactor RegisterDialog so AutoBindWizard can subclass it easier.
    
    Give AutoAttachWidget it's own choose_initial_screen
    since it doesn't need to detect if a system is registered.
    
    Populate gui with info from kickstart (mostly).
    
    Add a Screen.populate() method in registergui for
    populating the screens widgets with defaults or
    the values from a kickstart.
    
    Change _on_refresh_cb to accept an unused msg arg
    for consistency. (1254550)
    
    Add 'register-message' signal for non error info (for
    example, displaying the info that a system is already
    registered and attached).
    
    Move to having RegisterWidget driven by RegInfo
    
    Add a pre() to ChooseServerPage() that it can use to
    decide if it should start there are go to attach, etc.
    
    Some screen bookeeping simplified.
    
    Add a RegisterWidget.current_screen python prop
    
    Rearrange the methods in this class to make some sense
    
    Cleanup, refactoring, docs, test fixes, etc.

Comment 6 Sean Toner 2015-09-29 14:22:54 UTC
Created attachment 1078385 [details]
initial-setup on already registered system

I registered a system via a regular subscription-manager registration.  I then went back and brought up the subscription-manager-initial-setup-addon through the initial-setup command.

It detected that the system was already registered (see attached screenshot).

Tested against subscription-manager-initial-setup-addon-1.15.9-12.el7.x86_64

Comment 7 errata-xmlrpc 2015-11-19 11:49:14 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