Change in vdsm[master]: gluster: Warn about missing glusterfs-cli package
ahino at redhat.com
ahino at redhat.com
Sat Dec 12 15:56:37 UTC 2015
Ala Hino has uploaded a new change for review.
Change subject: gluster: Warn about missing glusterfs-cli package
......................................................................
gluster: Warn about missing glusterfs-cli package
In 3.6 we introduced a dependency to glusterfs-cli. This is required in
order to get gluster volume info needed to get gluster backup servers
and replica related logic. Howevre, we found tht during upgrade, if
glusterfs-cli is not installed, there is a not-completely clear
exception in the log file. In this case, we'd like to add a warning
message in the log clearly indicating missing glustefs-cli package.
Change-Id: I9c33aa33e4ffe6a382d40e1bc63f6735efcfcd1f
Signed-off-by: Ala Hino <ahino at redhat.com>
https://bugzilla.redhat.com/1290997
---
M vdsm/storage/storageServer.py
1 file changed, 11 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/50363/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index d30902f..2e538b4 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -43,6 +43,7 @@
import iscsi
from sync import asyncmethod, AsyncCallStub
from mount import MountError
+from gluster import exception as ge
import storage_exception as se
@@ -356,9 +357,16 @@
return "backup-volfile-servers=" + ":".join(servers)
def _get_gluster_volinfo(self):
- volinfo = supervdsm.getProxy().glusterVolumeInfo(self._volname,
- self._volfileserver)
- return volinfo[self._volname]
+ try:
+ sVdsmProxy = supervdsm.getProxy()
+ volinfo = sVdsmProxy.glusterVolumeInfo(self._volname,
+ self._volfileserver)
+ return volinfo[self._volname]
+ except ge.GlusterCmdExecFailedException:
+ self.log.warning("Required glusterfs-cli package is missing on "
+ "this host. Please install the package to work "
+ "with gluster storage")
+ raise
class NFSConnection(object):
--
To view, visit https://gerrit.ovirt.org/50363
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c33aa33e4ffe6a382d40e1bc63f6735efcfcd1f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino at redhat.com>
More information about the vdsm-patches
mailing list