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.
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.
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.
(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.
Fixed upstream: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=a0c7875c547fb8a420d789271f5e6660210e749f
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions