Bug 872727

Summary: Cannot go back too far during firstboot after registering
Product: Red Hat Enterprise Linux 6 Reporter: J.C. Molet <jmolet>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: alikins, dgoodwin, jsefler
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: 2014-01-17 17:48:56 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: 863175    

Description J.C. Molet 2012-11-02 20:22:18 UTC
Description of problem:
After you register with subscription-manager in firstboot, you the back button only works as long as you do not go back past the "Set up Software Updates" section.

Version-Release number of selected component (if applicable):
python-rhsm-1.1.4-1.git.0.57fc0de.el6.x86_64
subscription-manager-firstboot-1.1.5-1.git.0.8ced188.el6.x86_64
subscription-manager-1.1.5-1.git.0.8ced188.el6.x86_64
subscription-manager-gui-1.1.5-1.git.0.8ced188.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Run "subscription-manager clean" on the command line to obtain clean working environment.
2. Start firstboot
3. Continue along the firstboot process and successfully register using rhsm
4. Once registered, click the Back button -- this should put you at the server selection screen
5. Click Back again going to the module before "Set up Software Updates"
6. Click Forward
  
Actual results:
You cannot set up software updates again, as it thinks you are already registered.

Expected results:
You are able to set up software updates normally as you did the first time.

Additional info:
This is a regression, What used to happen was when you clicked back after registering there was a "subscription manager unregister" run in the background and your identity certificate was purged properly.  Now this doesn't seem to happen and all the certs are still there.  I'm not sure if this was changed deliberately, but not running unregister seems to break the back/forward functionality in this way.

Comment 1 Adrian Likins 2012-12-11 17:12:26 UTC
unsure if this is an intentional change or not. I suspect it may be a change in the rhn-client-tool modules, but need a closer look to verify. 

The previous "unregister" behavior was def intentional though. So if that has changed for no reason, it's a regression.

Comment 2 Adrian Likins 2012-12-17 17:55:32 UTC
Looking at comments for the module, and it looks like this might
be intentional:

        # Because the RHN client tools check if certs exist and bypass our
        # firstboot module if so, we know that if we reach this point and
        # identity certs exist, someone must have hit the back button.

Those changes are part of:

commit b775af3efa5766714f2627fd62e614ad4f7a9156
Author: Devan Goodwin <dgoodwin>
Date:   Tue Sep 25 16:21:25 2012 -0300

    853035: Fix firstboot "back" issues.
    
    If the user hits the back button after leaving our firstboot module,
    they should find themselves back at the "select a server" screen. When
    we go to register them again, the previous registration will be cleaned
    up.

So this behaviour is intentional. I'm not 100% sure it's optimal. If you
go with the theory that everything in firstboot should be redoable by
going "back", it is wrong. 

If we go all the way to the rhn "setup software updates" screen, it thinks
we are already registered, and doesn't offer reregistration as an option.

Comment 3 Adrian Likins 2012-12-17 20:29:35 UTC
This behaviour also seems to match the rhn behavior in a similar circumstance, so considering this not a blocker. 

We may want to clean it up in the future to handle the "back all the way" case for both rhn and rhsm registrations, so deferring to next release.

Comment 5 RHEL Program Management 2012-12-21 06:48:16 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 Devan Goodwin 2014-01-17 17:48:56 UTC
Closing for now, more info in above comments but essentially firstboot back behaviour is extremely difficult to get perfect for everyone, and what we have now is probably good enough.