Bug 1083403 - blivet.devices doesn't list LVM devices; blivet.thin{pools,lvs} doesn't list anything
Summary: blivet.devices doesn't list LVM devices; blivet.thin{pools,lvs} doesn't list ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-02 07:47 UTC by Jan Synacek
Modified: 2014-09-02 12:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-02 12:50:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Synacek 2014-04-02 07:47:22 UTC
Description of problem:
Consider the following python code:
import blivet
b = blivet.Blivet()
b.reset()
[d.name for d in b.devices]
[d.name for d in b.thinpools]
[d.name for d in b.thinlvs]

On my rawhide machine (updated Apr 1 2014), this code prints:
['sda', 'sda1', 'sda2', 'sr0', 'vda', <lot of vda/vdb/vdc devices>]
[]
[]

However, I do have thin pools and thin lvs on my system:
# lvs
  LV               VG                  Attr       LSize  Pool      Origin Data%  Move Log Cpy%Sync Convert
  root             fedora_rawhide-virt -wi-ao---- 17.51g                                                  
  swap             fedora_rawhide-virt -wi-ao----  2.00g                                                  
  thin-lv-10T-test vg1                 Vwi-a-tz-- 10.00t thinpool1          0.00                          
  thin-test-1      vg1                 Vwi-a-tz-- 10.00t thinpool1          0.00                          
  thin1            vg1                 Vwi-a-tz-- 10.00t thinpool1          0.00                          
  thinlv1-1        vg1                 Vwi-a-tz-- 50.00g thinpool1          0.00                          
  thinpool1        vg1                 twi-a-tz-- 64.00m                    0.00                          
  thinpool10       vg1                 twi-a-tz-- 64.00m                    0.00                          
  thinpool11       vg1                 twi-a-tz-- 64.00m                    0.00                          
  thinpool12       vg1                 twi-a-tz-- 64.00m                    0.00                          
  thinpool13       vg1                 twi-a-tz-- 64.00m                    0.00                          
  thinlv2-1        vg2                 Vwi-a-tz-- 10.00g thinpool2          0.00                          
  thinlv2-2        vg2                 Vwi-a-tz-- 20.00g thinpool2          0.00                          
  thinpool11       vg2                 twi-a-tz-- 64.00m                    0.00                          
  thinpool2        vg2                 twi-a-tz-- 64.00m                    0.00    


On my RHEL7 testing machine, the code prints:

['rhel', 'rhel-root', 'rhel-swap', 'sr0', 'vda', 'vda1', 'vda2', 'vdb', 'vdb1', 'vgtest', 'vgtest-testlv', 'vgtest-testpool']
['vgtest-testpool']
['vgtest-testlv']

# lvs
  LV       VG     Attr       LSize   Pool     Origin Data%  Move Log Cpy%Sync Convert
  root     rhel   -wi-ao----   6.71g                                                 
  swap     rhel   -wi-ao---- 820.00m                                                 
  testlv   vgtest Vwi-a-tz--  10.00g testpool          0.00                          
  testpool vgtest twi-a-tz-- 512.00m                   0.00


Version-Release number of selected component (if applicable):
python-blivet-0.46-1.fc21.noarch (Rawhide)
python-blivet-0.18.32-1.el7.noarch (RHEL7)


Actual results:
blivet.devices doesn't contain all devices and blivet.thinpools/blivet.thinlvs doesn't work.


Expected results:
blivet.devices contains all devices and blivet.thinpools/blivet.thinlvs list thin pools and lvs correctly.

Comment 1 David Lehman 2014-08-29 18:52:24 UTC
I just tried this on master and it worked as expected, ie: I could not reproduce this. 

>>> import blivet
>>> print blivet.__version__
0.62
>>> b = blivet.Blivet()
>>> b.reset()
>>> [d.name for d in b.devices]
['btrfs.85', 'fedora', 'fedora-data', 'fedora-home', 'fedora-root', 'fedora-swap', u'sda', u'sda1', u'sda2', u'sda3', u'sdf', u'sdf1', u'sdf2', u'sr0', 'testvg', 'testvg-pool1', 'testvg-thin1']
>>> [d.name for d in b.thinpools]
['testvg-pool1']
>>> [d.name for d in b.thinlvs]
['testvg-thin1']


Does it work for you now as well?

Comment 2 Jan Synacek 2014-09-01 07:28:49 UTC
Yes, version 0.62 works. Thanks!


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