Bug 247325

Summary: system-config-lvm will not load if there are mirrored logical volumes created with --nosync.
Product: Red Hat Enterprise Linux 5 Reporter: Gregory Marquart <gmarquart>
Component: system-config-lvmAssignee: Jim Parsons <jparsons>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: agk, cluster-maint, cmarthal, ctatman, drobinso, edamato, kanderso, mnowak, prockai, rkenna
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0442 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 14:26:13 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:
Attachments:
Description Flags
lvs shows an attribute of 'M' for --nosync mirrors, not 'm' none

Description Gregory Marquart 2007-07-06 23:06:27 UTC
Description of problem:
system-config-lvm will not load if there are mirrored logical volumes created
with --nosync.

Version-Release number of selected component (if applicable):
tried both system-config-lvm-1.0.22 & system-config-lvm-1.1.1-2.fc7

How reproducible:
easily?

Steps to Reproduce:
1.create a new unsynchronized mirrored logical volume (example: lvcreate -m1
--nosync vg0 -L 15G -n lv1)
2.load system-config-lvm
3.system-config-lvm crashes with the following error:

  File "/usr/share/system-config-lvm/ExtentBlock.py", line 14, in __init__
    self.__pv.add_extent_block(self)
AttributeError: 'NoneType' object has no attribute 'add_extent_block'

Actual results:

Expected results:

Additional info:

Comment 1 David Robinson 2007-07-11 14:22:42 UTC
Created attachment 158954 [details]
lvs shows an attribute of 'M' for --nosync mirrors, not 'm'

Comment 4 Corey Marthaler 2008-03-25 18:38:12 UTC
I was able to reproduce this issue. 

Like the subjuect implies, you need to have a --nosync created mirror in order
for this to happen. I attempted to start s-c-lvm with a regular mirror, and a
regular mirror that was out of sync and in both case it started up just fine. It
wasn't until I added a --nosync created mirror to the mix that I saw this issue.

2.6.9-67.ELsmp
system-config-lvm-1.0.23-1.0

mirror3 is the nosync mirror, it has a 'M' for an attribute instead of 'm':
  mirror1            taft       mwi-a-  2.00G                    mirror1_mlog
100.00 mirror1_mimage_0(0),mirror1_mimage_1(0)
  [mirror1_mimage_0] taft       iwi-ao  2.00G                                  
     /dev/sdb1(0)   
  [mirror1_mimage_1] taft       iwi-ao  2.00G                                  
     /dev/sdc1(0)   
  [mirror1_mlog]     taft       lwi-ao  4.00M                                  
     /dev/sdh1(0)   
  mirror2            taft       mwi-a-  2.00G                    mirror2_mlog
100.00 mirror2_mimage_0(0),mirror2_mimage_1(0)
  [mirror2_mimage_0] taft       iwi-ao  2.00G                                  
     /dev/sdd1(0)   
  [mirror2_mimage_1] taft       iwi-ao  2.00G                                  
     /dev/sde1(0)   
  [mirror2_mlog]     taft       lwi-ao  4.00M                                  
     /dev/sdc1(512) 
  mirror3            taft       Mwi-a-  2.00G                    mirror3_mlog
100.00 mirror3_mimage_0(0),mirror3_mimage_1(0)
  [mirror3_mimage_0] taft       iwi-ao  2.00G                                  
     /dev/sdf1(0)   
  [mirror3_mimage_1] taft       iwi-ao  2.00G                                  
     /dev/sdg1(0)   
  [mirror3_mlog]     taft       lwi-ao  4.00M                                  
     /dev/sdc1(513)


[root@taft-04 ~]# system-config-lvm
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 135, in __init__
    self.prepare_tree()
  File "/usr/share/system-config-lvm/Volume_Tab_View.py", line 216, in prepare_tree
    self.model_factory.reload()
  File "/usr/share/system-config-lvm/lvm_model.py", line 167, in reload
    self.__query_LVs()
  File "/usr/share/system-config-lvm/lvm_model.py", line 536, in __query_LVs
    extent_block = ExtentBlock(pv, lv, ph_ext_beg, seg_size/len(devs))
  File "/usr/share/system-config-lvm/ExtentBlock.py", line 14, in __init__
    self.__pv.add_extent_block(self)
AttributeError: 'NoneType' object has no attribute 'add_extent_block'
[1]+  Done                    system-config-lvm


Comment 6 Corey Marthaler 2008-03-25 20:43:00 UTC
fix verified in system-config-lvm-1.1.3-2.0.el5.noarch.rpm.

Comment 7 Ryan McCabe 2008-03-26 02:30:48 UTC
I've put a build with the fix at
http://people.redhat.com/rmccabe/system-config-lvm/system-config-lvm-1.1.3-2.0.el5.noarch.rpm
if anyone wants to grab it before there's an official release

Comment 14 Michal Nowak 2008-04-07 08:47:28 UTC
Hmm, right. Moving to ON_QA and that (^^) bug should be solved in-erratum.

Comment 17 errata-xmlrpc 2008-05-21 14:26:13 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 the 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-2008-0442.html