Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 693209

Summary: getVGList fails when there are no VGs
Product: Red Hat Enterprise Linux 6 Reporter: Rami Vaknin <rvaknin>
Component: vdsmAssignee: Saggi Mizrahi <smizrahi>
Status: CLOSED ERRATA QA Contact: Rami Vaknin <rvaknin>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: abaron, bazulay, iheim, ilvovsky, mgoldboi, sgrinber, yeylon, ykaul
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.9-58.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
RHEVM 2.3 on dev env, RHEL6.1 hosts. vdsm-4.9-57.el6.x86_64.
Last Closed: 2011-12-06 07:11:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
VDSM Logs none

Description Rami Vaknin 2011-04-03 14:42:00 UTC
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

Comment 3 Dan Kenigsberg 2011-04-03 21:03:17 UTC
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.

Comment 4 Saggi Mizrahi 2011-04-06 12:43:14 UTC
Patch in trunk
941356e BZ#693209 - GetVGInfo failed if there were no VGs

Comment 5 yeylon@redhat.com 2011-04-10 11:52:50 UTC
Rami, can you please re-run automation see if this reproduces?

Comment 6 Rami Vaknin 2011-08-22 15:17:38 UTC
Verified (vdsm-4.9-92.el6.x86_64)

Comment 7 errata-xmlrpc 2011-12-06 07:11:46 UTC
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