diff options
author | François Charlier <francois.charlier@enovance.com> | 2011-12-02 16:55:21 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2012-01-04 19:40:08 +0000 |
commit | 43e0b44db00b3aece584978dace0bcc84e0eef52 (patch) | |
tree | ed9f42e862e70a1c89a8c20bfb090aa961018576 | |
parent | b4cfd9ab1b78d8926072615d21cb7bd430b38612 (diff) | |
download | nova-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-- | Authors | 1 | ||||
-rw-r--r-- | nova/volume/driver.py | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -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")) |