Change in vdsm[master]: Issuing a real pvs cmd when there are no PVs belonging to a ...

ewarszaw at redhat.com ewarszaw at redhat.com
Fri May 10 02:56:21 UTC 2013


Eduardo has uploaded a new change for review.

Change subject: Issuing a real pvs cmd when there are no PVs belonging to a VG.
......................................................................

Issuing a real pvs cmd when there are no PVs belonging to a VG.

Assumed the vgName is an existent reacheable VG, must be PVs
belonging to it.
The pvs dict may be staled if this is a FC setup and/or
connectStorageServer was not issued and therefore the storage view
was not refreshed.

This patch is an alternative to other fixes for the same bug.

Change-Id: I22cd4f099f2232f718d09f923630fe9828d11233
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=955993
Signed-off-by: Eduardo <ewarszaw at redhat.com>
---
M vdsm/storage/lvm.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/14634/1

diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index 97fe38a..5f03d8f 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -1259,7 +1259,11 @@
 
 def listPVNames(vgName):
     pvs = getAllPVs()
-    return [pv.name for pv in pvs if pv.vg_name == vgName]
+    vgPVs = [pv.name for pv in pvs if pv.vg_name == vgName]
+    if vgPVs == []:
+        _lvminfo._invalidateAllPvs()
+        vgPVs = [pv.name for pv in pvs if pv.vg_name == vgName]
+    return vgPVs
 
 
 def setrwLV(vg, lv, rw=True):


--
To view, visit http://gerrit.ovirt.org/14634
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22cd4f099f2232f718d09f923630fe9828d11233
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>


More information about the vdsm-patches mailing list