diff options
| author | Yoshiaki Tamura <yoshi@midokura.jp> | 2011-04-12 11:37:51 +0900 |
|---|---|---|
| committer | Yoshiaki Tamura <yoshi@midokura.jp> | 2011-04-12 11:37:51 +0900 |
| commit | 87d758b18836085d73c8b4230cd4812e0aa876aa (patch) | |
| tree | 19ef1a80c7cbef33a3f5a0dac9746816ce97d642 | |
| parent | 1617d27020e45ab587ef75a8e74d76dfe82df861 (diff) | |
| download | nova-87d758b18836085d73c8b4230cd4812e0aa876aa.tar.gz nova-87d758b18836085d73c8b4230cd4812e0aa876aa.tar.xz nova-87d758b18836085d73c8b4230cd4812e0aa876aa.zip | |
Fix RBDDriver in volume manager. discover_volume was raising exception.
Modified local_path as well.
| -rw-r--r-- | Authors | 1 | ||||
| -rw-r--r-- | nova/volume/driver.py | 6 |
2 files changed, 3 insertions, 4 deletions
@@ -74,5 +74,6 @@ Trey Morris <trey.morris@rackspace.com> Tushar Patil <tushar.vitthal.patil@gmail.com> Vasiliy Shlykov <vash@vasiliyshlykov.org> Vishvananda Ishaya <vishvananda@gmail.com> +Yoshiaki Tamura <yoshi@midokura.jp> Youcef Laribi <Youcef.Laribi@eu.citrix.com> Zhixue Wu <Zhixue.Wu@citrix.com> diff --git a/nova/volume/driver.py b/nova/volume/driver.py index 850893914..85ff17708 100644 --- a/nova/volume/driver.py +++ b/nova/volume/driver.py @@ -557,7 +557,7 @@ class RBDDriver(VolumeDriver): """Returns the path of the rbd volume.""" # This is the same as the remote path # since qemu accesses it directly. - return self.discover_volume(volume) + return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name']) def ensure_export(self, context, volume): """Synchronously recreates an export for a logical volume.""" @@ -571,10 +571,8 @@ class RBDDriver(VolumeDriver): """Removes an export for a logical volume""" pass - def discover_volume(self, volume): + def discover_volume(self, context, volume): """Discover volume on a remote host""" - # NOTE(justinsb): This is messed up... discover_volume takes 3 args - # but then that would break local_path return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name']) def undiscover_volume(self, volume): |
