diff options
| author | François Charlier <francois.charlier@enovance.com> | 2011-12-02 16:55:21 +0100 |
|---|---|---|
| committer | François Charlier <francois.charlier@enovance.com> | 2011-12-06 13:00:47 +0100 |
| commit | fb0f0388dee8c7cd612beaa065be8afd06fb2540 (patch) | |
| tree | 8441134d1669059a7dd277f43968bd78ebb079ca /nova | |
| parent | 0b0d573fd31257fbbea5944da327989668cd7d3d (diff) | |
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
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/volume/driver.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/volume/driver.py b/nova/volume/driver.py index 86161d068..606b5b507 100644 --- a/nova/volume/driver.py +++ b/nova/volume/driver.py @@ -537,8 +537,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")) |
