Hide Forgot
Created attachment 489657 [details] VDSM Logs Scenario: The bug was found while running network automation test, while trying to activate host after deleting all VMs, templates, pools and networks from that VM/DSD of that VM. From VDSM Logs: Thread-22037::INFO::2011-04-03 11:24:10,758::dispatcher::94::Storage.Dispatcher.Protect::(run) Run and protect: getVGList, args: () Thread-22037::DEBUG::2011-04-03 11:24:10,758::task::491::TaskManager.Task::(_debug) Task de2909fd-391c-41dd-b9dc-42764b2ba53a: moving from state init -> state preparing Thread-22037::DEBUG::2011-04-03 11:24:10,759::misc::1011::SamplingMethod::(__call__) Trying to enter sampling method (storage.sdc.refreshStorage) Thread-22037::DEBUG::2011-04-03 11:24:10,759::misc::1013::SamplingMethod::(__call__) Got in to sampling method Thread-22037::DEBUG::2011-04-03 11:24:10,759::misc::1011::SamplingMethod::(__call__) Trying to enter sampling method (storage.iscsi.rescan) Thread-22037::DEBUG::2011-04-03 11:24:10,760::misc::1013::SamplingMethod::(__call__) Got in to sampling method Thread-22037::DEBUG::2011-04-03 11:24:10,760::iscsi::684::Storage.Misc.excCmd::(rescan) '/usr/bin/sudo -n /sbin/iscsiadm -m session -R' (cwd None) Thread-22037::DEBUG::2011-04-03 11:24:10,775::iscsi::684::Storage.Misc.excCmd::(rescan) FAILED: <err> = 'iscsiadm: No session found.\n'; <rc> = 21 Thread-22037::DEBUG::2011-04-03 11:24:10,776::misc::1021::SamplingMethod::(__call__) Returning last result Thread-22037::DEBUG::2011-04-03 11:24:10,776::supervdsm::30::SuperVdsmProxy::(__connect) Trying to conenct to Super Vdsm Thread-22037::DEBUG::2011-04-03 11:24:10,780::supervdsm::61::SuperVdsmProxy::(__init__) Connected to Super Vdsm Thread-22037::DEBUG::2011-04-03 11:24:12,173::multipath::60::Storage.Misc.excCmd::(rescan) '/usr/bin/sudo -n /sbin/multipath' (cwd None) Thread-22037::DEBUG::2011-04-03 11:24:12,254::multipath::60::Storage.Misc.excCmd::(rescan) SUCCESS: <err> = ''; <rc> = 0 Thread-22037::DEBUG::2011-04-03 11:24:12,255::multipath::290::Storage.Misc.excCmd::(getMPDevNamesIter) '/usr/bin/sudo -n /sbin/dmsetup ls --target multipath' (cwd None) Thread-22037::DEBUG::2011-04-03 11:24:12,277::misc::1167::Storage.Misc::(acquire) Operation 'lvm invalidate operation' got the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,278::misc::1175::Storage.Misc::(release) Operation 'lvm invalidate operation' released the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,278::misc::1167::Storage.Misc::(acquire) Operation 'lvm invalidate operation' got the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,279::misc::1175::Storage.Misc::(release) Operation 'lvm invalidate operation' released the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,279::misc::1167::Storage.Misc::(acquire) Operation 'lvm invalidate operation' got the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,280::misc::1175::Storage.Misc::(release) Operation 'lvm invalidate operation' released the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,280::misc::1021::SamplingMethod::(__call__) Returning last result Thread-22037::DEBUG::2011-04-03 11:24:12,281::misc::1167::Storage.Misc::(acquire) Operation 'lvm reload operation' got the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,282::lvm::352::Storage.Misc.excCmd::(cmd) '/usr/bin/sudo -n /sbin/lvm vgs --config " devices { preferred_names = [\\"^/dev/mapper/\\"] ignore_suspended_devices=1 write_cache_state=0 filter = [ \\"r%.*%\\" ] } global { locking_type=1 prioritise_write_locks=1 wait_for_locks=1 } backup { retain_min = 50 retain_days = 0 } " --noheadings --units b --nosuffix --separator | -o uuid,name,attr,size,free,extent_size,extent_count,free_count,tags' (cwd None) Thread-22037::DEBUG::2011-04-03 11:24:12,455::lvm::352::Storage.Misc.excCmd::(cmd) SUCCESS: <err> = ' No volume groups found\n'; <rc> = 0 Thread-22037::DEBUG::2011-04-03 11:24:12,456::misc::1175::Storage.Misc::(release) Operation 'lvm reload operation' released the operation mutex Thread-22037::DEBUG::2011-04-03 11:24:12,457::multipath::183::Storage.Misc.excCmd::(pathListIter) '/usr/bin/sudo -n /sbin/multipath -ll' (cwd None) Thread-22037::DEBUG::2011-04-03 11:24:12,464::supervdsm::30::SuperVdsmProxy::(__connect) Trying to conenct to Super Vdsm Thread-22037::DEBUG::2011-04-03 11:24:12,468::supervdsm::61::SuperVdsmProxy::(__init__) Connected to Super Vdsm Thread-22037::ERROR::2011-04-03 11:24:12,474::task::854::TaskManager.Task::(_setError) Unexpected error Traceback (most recent call last): File "/usr/share/vdsm/storage/task.py", line 862, in _run return fn(*args, **kargs) File "/usr/share/vdsm/storage/hsm.py", line 1448, in public_getVGList vgs = self.__getVGsInfo() File "/usr/share/vdsm/storage/hsm.py", line 1483, in __getVGsInfo self.__processVGInfos(vgInfos, vgInfo, pathDict, getGuid, dev, vgType) UnboundLocalError: local variable 'vgInfo' referenced before assignment
ooh, an ancient regression, as of http://git.engineering.redhat.com/?p=users/dkenigsb/vdsm.git;a=commitdiff;h=d31474c4863d9a47c0a93f79a26b68b2b4fd623b Besides of it, much of HSM.__processVGInfos seems nonsensical to me... The fact that the reported devtype of a pv depends on other pvs is surprising. But that's unrelated to this bug.
Patch in trunk 941356e BZ#693209 - GetVGInfo failed if there were no VGs
Rami, can you please re-run automation see if this reproduces?
Verified (vdsm-4.9-92.el6.x86_64)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2011-1782.html