Bug 595320

Summary: Getter does not work in firstboot's Interface, modulesets show the top level screens again
Product: Red Hat Enterprise Linux 6 Reporter: Jan Pazdziora <jpazdziora>
Component: firstbootAssignee: Martin Gracik <mgracik>
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: alikins, borgan, dmach, mganisin, notting, syeghiay
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: firstboot-1.110.4-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 20:51:11 UTC Type: ---
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: 585188    

Description Jan Pazdziora 2010-05-24 11:29:45 UTC
Description of problem:

While trying to find a way to implement RHN register part of firstboot, I came across a problem that ModuleSet modules did not show the screens of its modules, but started with the Welcome page again.

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

# rpm -q firstboot
firstboot-1.110.3-1.el6.i686

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have firstboot on RHEL 6 (and Fedora 12).
2. Create ModuleSet module.
3. Try to hit Forward to get to it.
  
Actual results:

Once you hit the moduleset, the first module screen is shown again.

Expected results:

Forward should just walk through the screens of modules of that moduleset.

Additional info:

Comment 1 Jan Pazdziora 2010-05-24 11:30:25 UTC
If we decide to implement RHN Register part of firstboot for RHEL 6 using the ModuleSets, this bugzilla will become a Beta 2 blocker.

Comment 2 Jan Pazdziora 2010-05-24 11:31:06 UTC
The following patch seems to fix the problem and makes walking through the pages working:

--- /usr/lib/python2.6/site-packages/firstboot/interface.py.orig	2010-05-14 13:31:19.000000000 +0200
+++ /usr/lib/python2.6/site-packages/firstboot/interface.py	2010-05-24 13:22:59.157335561 +0200
@@ -34,7 +34,7 @@
         self.history = []
         self.moduleList = []
 
-class Interface:
+class Interface(object):
     def __init__(self, autoscreenshot=False, moduleList=[], testing=False):
         """Create a new Interface instance.  Instance attributes:

Comment 3 Jan Pazdziora 2010-05-24 11:31:38 UTC
However, this patch breaks that sidebar arrow.

In Fedora 12, the arrow is there just fine, even with this patch.

Comment 4 Jan Pazdziora 2010-05-24 11:33:12 UTC
Actually, the sidebar arrow brakage seems to be kinda random in RHEL 6, sometimes it works and sometimes it does not.

Comment 5 Jan Pazdziora 2010-05-24 11:35:36 UTC
Please note that if you set priority = 0 in your moduleset module, running firstboot will still fail, with

firstboot 1.110 exception report
Traceback (most recent call last):
  File "/usr/sbin/firstboot", line 199, in <module>
    config.interface.run()
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 421, in run
    self.displayModule()
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 337, in displayModule
    currentModule.focus()
AttributeError: moduleClass instance has no attribute 'focus'

Comment 7 Jan Pazdziora 2010-05-25 11:14:02 UTC
Another bug in the firstboot code: if the number of modules in your moduleset it greater than the number of the top level modules, stepping to the moduleset shows exception window with

firstboot 1.110.3 exception report
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 105, in _nextClicked
    self.advance()
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 158, in advance
    self.moveToPage(pageNum=self._control.currentPage+1)
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 412, in moveToPage
    self._setPointer(self._controlStack[0].currentPage)
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 116, in _setPointer
    (alignment, label) = self.sidebar.get_children()[i].get_children()
IndexError: list index out of range

Comment 8 Jan Pazdziora 2010-05-25 11:15:58 UTC
The following patch is needed to fix the problem:

--- /usr/lib/python2.6/site-packages/firstboot/interface.py.orig	2010-05-14 13:31:19.000000000 +0200
+++ /usr/lib/python2.6/site-packages/firstboot/interface.py	2010-05-25 13:12:04.663294374 +0200
@@ -111,7 +111,7 @@
         # The sidebar pointer only works in terms of the top-level module list
         # as we don't display anything on the side for a ModuleSet and making
         # the pointer move around then would be confusing.
-        for i in range(len(self.moduleList)):
+        for i in range(len(self.sidebar.get_children())):
             (alignment, label) = self.sidebar.get_children()[i].get_children()
             pix = alignment.get_children()[0]
 

In short, the self.moduleList now (correctly, with the patch from comment 2) points to the list of modules in the moduleset, not to the list of top level modules.

That's why we will just loop over the sidebar children because that's what we essentially care about anyway.

Comment 10 Martin Gracik 2010-05-25 17:21:53 UTC
Fixed in version firstboot-1.110.4-1

Comment 15 releng-rhel@redhat.com 2010-07-02 20:51:11 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 16 Adrian Likins 2010-09-21 14:02:19 UTC
*** Bug 635738 has been marked as a duplicate of this bug. ***