| Summary: | blivet.reset() fails when thin storage is present | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan Synacek <jsynacek> |
| Component: | python-blivet | Assignee: | David Lehman <dlehman> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | amulhern, anaconda-maint-list, bcl, dlehman, jsafrane |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-11-06 19:08:53 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: | |
Apparently, there *is* an internal LV called 'lvol0_pmspare' on the system...
# lvs -a
# lvs -a
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
lv1 vg1 -wi-a----- 96.00m
lv2 vg1 -wi-a----- 96.00m
[lvol0_pmspare] vg1 ewi------- 32.00m
thin1 vg1 Vwi-a-tz-- 100.00g thinpool 0.05
thinpool vg1 twi-a-tz-- 1.59g 3.32
[thinpool_tdata] vg1 Twi-ao---- 1.59g
[thinpool_tmeta] vg1 ewi-ao---- 32.00m
So, I don't think that blivet should be listing the internal LVs.
In devicelibs/lvm.py:
def lvs(vg_name):
args = ["lvs",
"-a", "--unit", "k", "--nosuffix", "--nameprefixes", "--rows",
"--unquoted", "--noheadings",
"-olv_name,lv_uuid,lv_size,lv_attr,segtype"] + \
_getConfigArgs(read_only_locking=True) + \
[vg_name]
rc = util.capture_output(["lvm"] + args)
...
This bug report completely fails to indicate the version of blivet it is reported against, but this should nonetheless be fixed in python-blivet-0.24-1 (on master/rawhide) and 0.23.1-1 (f20-branch). |
Description of problem: The following snippet fails when there is a thin pool and a thin volume on my system. ----- snip ----- import blivet b = blivet.Blivet() b.reset() ----- snip ----- Running the snippet produces: Traceback (most recent call last): File "blivet-ipython.start", line 4, in <module> b.reset() File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 417, in reset self.devicetree.populate(cleanupOnly=cleanupOnly) File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1859, in populate self._populate() File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1915, in _populate self.addUdevDevice(dev) File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1075, in addUdevDevice self.handleUdevDeviceFormat(info, device) File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1692, in handleUdevDeviceFormat self.handleUdevLVMPVFormat(info, device) File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1405, in handleUdevLVMPVFormat self.handleVgLvs(vg_device) File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1274, in handleVgLvs raid[name]["meta"] += lv_sizes[index] KeyError: 'vg1-lvol0_pmspare' I have no idea where 'lvol0_pmspare' comes from. It appears to be some kind of internal thing of the lvm when managing thin volumes. Additionally: # vgs VG #PV #LV #SN Attr VSize VFree vg1 3 4 0 wz--n- 2.84g 1.00g # lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert lv1 vg1 -wi-a----- 96.00m lv2 vg1 -wi-a----- 96.00m thin1 vg1 Vwi-a-tz-- 100.00g thinpool 0.05 thinpool vg1 twi---tz-- 1.59g 3.32 # find /dev/ -name '*vg1*' /dev/vg1 /dev/disk/by-id/dm-name-vg1-thin1 /dev/disk/by-id/dm-name-vg1-lv2 /dev/disk/by-id/dm-name-vg1-lv1 /dev/mapper/vg1-thin1 /dev/mapper/vg1-thinpool-tpool /dev/mapper/vg1-lv2 /dev/mapper/vg1-lv1 /dev/mapper/vg1-thinpool_tmeta /dev/mapper/vg1-thinpool_tdata Version-Release number of selected component (if applicable): python-blivet-0.22-1.fc21.noarch Steps to Reproduce: 1. See description Actual results: Blivet initialization fails. Expected results: Blivet initialization finishes as expected.