Bug 1318754 - Failed to call the 'PvCreate' method on the '/com/redhat/lvmdbus1/Manager' object
Summary: Failed to call the 'PvCreate' method on the '/com/redhat/lvmdbus1/Manager' ob...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tony Asleson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-17 17:02 UTC by Chris Lumens
Modified: 2016-03-29 09:47 UTC (History)
13 users (show)

Fixed In Version: lvm2-2.02.148-1.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-29 09:42:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
virt-install.log (294.84 KB, text/plain)
2016-03-17 17:02 UTC, Chris Lumens
no flags Details

Description Chris Lumens 2016-03-17 17:02:34 UTC
Created attachment 1137447 [details]
virt-install.log

Running our LVM-on-RAID test, I am seeing the following traceback:

ot error: Failed to call the 'PvCreate' method on the '/com/redhat/lvmdbus1/Manager' object: GDBus.Error:org.freedesktop.DBus.Python.KeyError: Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/lvmdbusd/request.py", line 65, in run_cmd
    result = self.method(*self.arguments)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/manager.py", line 48, in _pv_create
    pvs = load_pvs([device], emit_signal=True)[0]
  File "/usr/lib/python3.5/site-packages/lvmdbusd/pv.py", line 48, in load_pvs 
   emit_signal, cache_refresh)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/loader.py", line 37, in common
    objects = retrieve(search_keys, cache_refresh=False)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/pv.py", line 31, in pvs_state_retrieve
    for p in cfg.db.fetch_pvs(selection):
  File "/usr/lib/python3.5/site-packages/lvmdbusd/lvmdb.py", line 312, in fetch_pvs
    rc.append(self.pvs[self.pv_path_to_uuid[s]])
KeyError: dbus.String('/dev/md/pv.01')

dlehman suggested I start with the libblockdev component and we work from there.  I will also attach the complete virt-install.log, which should have everything from storage.  I don't know how reproducible this is - this is the first day I've noticed it.

Comment 1 Vratislav Podzimek 2016-03-18 13:22:57 UTC
This looks to me more like a bug in the LVM DBus code. My guess is that the problem is with the /dev/md/SOMETHING symlinks. I think only the things like /dev/md126 are in the dictionary and that results in the KeyError.

Comment 2 Tony Asleson 2016-03-18 16:14:03 UTC
We are failing because we cannot find the pv we just created.  The dbus service got a good exit code from the pvcreate command.  We then immediately turned around and refreshed the state of dbus service by issuing a pvs, vgs & lvs.  Then we parse stdout for all three commands and build a number of tables in the dbus service.  Then using these tables we try to locate the pv we just created by translating from '/dev/md/pv.01' to uuid which causes an exception as '/dev/md/pv.01' is missing from the hash table.

Best guess at this point is pvcreate returns before udev settle is done (acknowledged by lvm team), thus subsequent pvs does not find the newly created PV.

I will add a udev settle in dbus service after pvcreate and add additional debug to dump the output of lvm when we hit a keyerror exception like this.

Comment 3 Tony Asleson 2016-03-21 17:15:02 UTC
(In reply to Vratislav Podzimek from comment #1)
> This looks to me more like a bug in the LVM DBus code. My guess is that the
> problem is with the /dev/md/SOMETHING symlinks. I think only the things like
> /dev/md126 are in the dictionary and that results in the KeyError.

You are correct, however at the moment I'm not sure what the best way is to handle this.

Comment 5 Mike McCune 2016-03-28 23:38:32 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions


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