summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Charlier <francois.charlier@enovance.com>2011-12-02 16:55:21 +0100
committerMark McLoughlin <markmc@redhat.com>2012-01-04 19:40:08 +0000
commit43e0b44db00b3aece584978dace0bcc84e0eef52 (patch)
treeed9f42e862e70a1c89a8c20bfb090aa961018576
parentb4cfd9ab1b78d8926072615d21cb7bd430b38612 (diff)
downloadnova-43e0b44db00b3aece584978dace0bcc84e0eef52.tar.gz
Pass '-r' option to 'collie cluster status'.
The 'collie cluster status' default output is more verbose since sheepdog 0.24. The '-r' (raw) option has been added for less verbose output but won't be used to ensure compatibility with pre-0.24 sheepdog. Change-Id: Ie31bdded928772250515e439016fc5c5beb00d83
-rw-r--r--Authors1
-rw-r--r--nova/volume/driver.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/Authors b/Authors
index a9266b25bc..cc9683bda4 100644
--- a/Authors
+++ b/Authors
@@ -43,6 +43,7 @@ Eldar Nugaev <reldan@oscloud.ru>
Eric Day <eday@oddments.org>
Eric Windisch <eric@cloudscaling.com>
Ewan Mellor <ewan.mellor@citrix.com>
+François Charlier <francois.charlier@enovance.com>
Gabe Westmaas <gabe.westmaas@rackspace.com>
Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp>
Hisaki Ohara <hisaki.ohara@intel.com>
diff --git a/nova/volume/driver.py b/nova/volume/driver.py
index e5bb498edb..bb5695684d 100644
--- a/nova/volume/driver.py
+++ b/nova/volume/driver.py
@@ -690,8 +690,11 @@ class SheepdogDriver(VolumeDriver):
def check_for_setup_error(self):
"""Returns an error if prerequisites aren't met"""
try:
+ #NOTE(francois-charlier) Since 0.24 'collie cluster info -r'
+ # gives short output, but for compatibility reason we won't
+ # use it and just check if 'running' is in the output.
(out, err) = self._execute('collie', 'cluster', 'info')
- if not out.startswith('running'):
+ if not 'running' in out.split():
raise exception.Error(_("Sheepdog is not working: %s") % out)
except exception.ProcessExecutionError:
raise exception.Error(_("Sheepdog is not working"))