Bug 522200 - [CRM#1935122] system-config-lvm crashes at startup (empty PhysicalVolume.devnames)
Summary: [CRM#1935122] system-config-lvm crashes at startup (empty PhysicalVolume.devn...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: system-config-lvm
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-09 18:32 UTC by ritz
Modified: 2018-10-27 15:56 UTC (History)
9 users (show)

Fixed In Version: system-config-lvm-1.1.5-3.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:42:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0267 0 normal SHIPPED_LIVE system-config-lvm bug fix update 2010-03-29 12:54:55 UTC

Description ritz 2009-09-09 18:32:09 UTC
Created attachment 360307 [details]
patch

Description of problem:
system-config-lvm crashes at startup

Version-Release number of selected component (if applicable):
1.1.5-1.0.el5

How reproducible:
always

Steps to Reproduce:
1. system-config-lvm
  
Actual results:
system-config-lvm crashes at startup

Expected results:
system-config-lvm should Just Work

Additional info:
Not sure, why pv.devnames is empty. Patch attached to allow pv.getPartition() handle this case gracefuly, From Adrien Kunysz

Here is the backtrace extracted from strace:

Traceback (most recent call last):
 File "/usr/sbin/system-config-lvm", line 173, in ?
   runFullGUI()
 File "/usr/sbin/system-config-lvm", line 158, in runFullGUI
   blvm = baselvm(glade_xml, app)
 File "/usr/sbin/system-config-lvm", line 108, in __init__
   self.volume_tab_view = Volume_Tab_View(glade_xml, self.lvmm, self.main_win)
 File "/usr/share/system-config-lvm/Volume_Tab_View.py", line 133, in __init__
   self.prepare_tree()
 File "/usr/share/system-config-lvm/Volume_Tab_View.py", line 214, in prepare_tree
   self.model_factory.reload()
 File "/usr/share/system-config-lvm/lvm_model.py", line 175, in reload
   self.__set_LVs_props() # has to come after link_mirrors
 File "/usr/share/system-config-lvm/lvm_model.py", line 801, in __set_LVs_props
   lv.set_properties(self.__get_data_for_LV(lv))
 File "/usr/share/system-config-lvm/lvm_model.py", line 857, in __get_data_for_LV
   text_list.append(self.__getFS(lv.get_path()))
 File "/usr/share/system-config-lvm/lvm_model.py", line 987, in __getFS
   if path_list[0].getPartition() == None:
 File "/usr/share/system-config-lvm/PhysicalVolume.py", line 146, in getPartition
   return (self.getDevnames()[0], self.part)
IndexError: list index out of range

So it looks like self.getDevnames() returns and empty list. Here is that method full body:

 def getDevnames(self):
   return self.devnames

Now, devnames is initialized as an empty list in __init__:
   self.devnames = []

It is grown by calling addDevname:
     self.devnames.append(devname)

and shrinked by calling removeDevname:
     self.devnames.pop(self.devnames.index(devname))

It seems clear that PV.getPartition() should be able to handle the empty list case as caller lvm_model:__getFS() can handle None.

There might still be a more fundamental problem however (why is devnames empty?).

Comment 12 Chris Ward 2010-02-11 10:23:33 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 21 errata-xmlrpc 2010-03-30 08:42:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0267.html


Note You need to log in before you can comment on or make changes to this bug.