Bug 822393 - [vdsm] getVGInfo on specific VG fails due to access problem with different VG
[vdsm] getVGInfo on specific VG fails due to access problem with different VG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm (Show other bugs)
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Eduardo Warszawski
storage rhev-3.0
: ZStream
Depends On:
  Show dependency treegraph
Reported: 2012-05-17 04:59 EDT by Meni Yakove
Modified: 2014-01-12 19:52 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 736301
Last Closed: 2012-05-31 09:23:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Meni Yakove 2012-05-17 04:59:01 EDT
Description of problem:

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


- 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 06:51:02 EDT
we have a patch on downstream\upstream: 

 git show fb7012c7
commit fb7012c752d80bb6b24d50389b84879988e90471
Author: Eduardo Warszawski <ewarszaw@redhat.com>
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@redhat.com>
    Tested-by: Dan Kenigsberg <danken@redhat.com>

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 Product and Program Management 2012-05-21 02:50:01 EDT
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 08:20:21 EDT
(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.

Note You need to log in before you can comment on or make changes to this bug.