Bug 822393

Summary: [vdsm] getVGInfo on specific VG fails due to access problem with different VG
Product: Red Hat Enterprise Linux 6 Reporter: Meni Yakove <myakove>
Component: vdsmAssignee: Eduardo Warszawski <ewarszaw>
Status: CLOSED WONTFIX QA Contact: Haim <hateya>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3CC: abaron, bazulay, danken, iheim, yeylon, ykaul
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage rhev-3.0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 736301 Environment:
Last Closed: 2012-05-31 13:23:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Meni Yakove 2012-05-17 08:59:01 UTC
Description of problem:

getVGInfo command on newly created storage fails due to access problem with one
of the other VGs in the system. 

flow: 

- create new storage domain using RHEVM 
   * createVG command - returns successfully 
   * createStorageDomain command - returns successfully 
   * getVGInfo on vgUUID - fails; 
     AttributeError: Failed reload: 703256d8-0c4a-4138-a150-e4db0ad87db9

when I issue vgs command, I see VG, also, getStorageDomainInfo command returns. 
problem solved just after I restarted vdsm, which points on cache issue.
also, i'm curious why getVGInfo, which requests specific device, fails, in case
different and unrelated vg is down. 

attached vdsm log.

Comment 1 Haim 2012-05-17 10:51:02 UTC
we have a patch on downstream\upstream: 


 git show fb7012c7
commit fb7012c752d80bb6b24d50389b84879988e90471
Author: Eduardo Warszawski <ewarszaw>
Date:   Tue Sep 13 10:39:31 2011 +0300

    BZ#736301 - Don't fail lvm.getVGbyUUID() if unreadable VGs found.
    
    Change-Id: Ief82082ebb3cfb6731dc9c7905f2844c60a7f425
    Reviewed-on: http://gerrit.usersys.redhat.com/930
    Reviewed-by: Dan Kenigsberg <danken>
    Tested-by: Dan Kenigsberg <danken>

diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index 0276f9e..9d734f7 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -833,12 +833,18 @@ def getVGs(vgNames):
 def getAllVGs():
     return _lvminfo.getAllVgs() #returns list
 
-
+# TODO: lvm VG UUID should not be exposed.
+# Remove this function when hsm.public_createVG is removed.
 def getVGbyUUID(vgUUID):
     # cycle through all the VGs until the one with the given UUID found
     for vg in getAllVGs():
-        if vg.uuid == vgUUID:
-            return vg
+        try:
+            if vg.uuid == vgUUID:
+                return vg
+        except AttributeError, e:
+            # An unreloadable VG found but may be we are not looking for it.
+            log.debug("%s" % e.message, exc_info=True)
+            continue
     # If not cry loudly
     raise se.VolumeGroupDoesNotExist("vg_uuid: %s" % vgUUID)

Comment 3 RHEL Program Management 2012-05-21 06:50:01 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Dan Kenigsberg 2012-05-21 12:20:21 UTC
(In reply to comment #0)
> 
> attached vdsm log.

Actually, no. Since we have the patch for upstream and form rhev-3.1, I am guessing you are refering to rhev-3.0.

I do not mind making this bug track this issue for the next 3.0.z build. Setting the Zstream keyword, as the 3.1 bug 736301 is already fixed.