summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJosh Durgin <joshd@hq.newdream.net>2011-01-12 10:17:48 -0800
committerJosh Durgin <joshd@hq.newdream.net>2011-01-12 10:17:48 -0800
commit70ac0dfea7a55c3580d4a9cd65752f894dfaa222 (patch)
tree1654fed80e0e3435507be8404256f365e06bec6e /nova
parentc93e8f5317ce0cc05e7af59b9e3dd8b8b6401b87 (diff)
downloadnova-70ac0dfea7a55c3580d4a9cd65752f894dfaa222.tar.gz
nova-70ac0dfea7a55c3580d4a9cd65752f894dfaa222.tar.xz
nova-70ac0dfea7a55c3580d4a9cd65752f894dfaa222.zip
Check for whole pool name in check_for_setup_error
Diffstat (limited to 'nova')
-rw-r--r--nova/volume/driver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/volume/driver.py b/nova/volume/driver.py
index fa914f662..609a00310 100644
--- a/nova/volume/driver.py
+++ b/nova/volume/driver.py
@@ -322,7 +322,8 @@ class RBDDriver(VolumeDriver):
def check_for_setup_error(self):
"""Returns an error if prerequisites aren't met"""
(stdout, stderr) = self._execute("rados lspools")
- if stdout.find(FLAGS.rbd_pool + "\n") == -1:
+ pools = stdout.split("\n")
+ if not FLAGS.rbd_pool in pools:
raise exception.Error(_("rbd has no pool %s") %
FLAGS.rbd_pool)