Merge lp:~tamura-yoshiaki/nova/bug-758404 into lp:~hudson-openstack/nova/trunk

Proposed by Yoshiaki Tamura
Status: Merged
Approved by: termie
Approved revision: 972
Merged at revision: 984
Proposed branch: lp:~tamura-yoshiaki/nova/bug-758404
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 35 lines (+3/-4)
2 files modified
Authors (+1/-0)
nova/volume/driver.py (+2/-4)
To merge this branch: bzr merge lp:~tamura-yoshiaki/nova/bug-758404
Reviewer Review Type Date Requested Status
termie (community) Approve
Vish Ishaya (community) Approve
Josh Durgin Pending
Review via email: mp+57271@code.launchpad.net

Commit message

Fix RBDDriver in volume manager. discover_volume was raising exception.
Modified local_path as well.

To post a comment you must log in.
Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve
Revision history for this message
termie (termie) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Authors'
--- Authors 2011-04-07 23:08:15 +0000
+++ Authors 2011-04-12 05:22:36 +0000
@@ -74,5 +74,6 @@
74Tushar Patil <tushar.vitthal.patil@gmail.com>74Tushar Patil <tushar.vitthal.patil@gmail.com>
75Vasiliy Shlykov <vash@vasiliyshlykov.org>75Vasiliy Shlykov <vash@vasiliyshlykov.org>
76Vishvananda Ishaya <vishvananda@gmail.com>76Vishvananda Ishaya <vishvananda@gmail.com>
77Yoshiaki Tamura <yoshi@midokura.jp>
77Youcef Laribi <Youcef.Laribi@eu.citrix.com>78Youcef Laribi <Youcef.Laribi@eu.citrix.com>
78Zhixue Wu <Zhixue.Wu@citrix.com>79Zhixue Wu <Zhixue.Wu@citrix.com>
7980
=== modified file 'nova/volume/driver.py'
--- nova/volume/driver.py 2011-03-28 23:42:28 +0000
+++ nova/volume/driver.py 2011-04-12 05:22:36 +0000
@@ -557,7 +557,7 @@
557 """Returns the path of the rbd volume."""557 """Returns the path of the rbd volume."""
558 # This is the same as the remote path558 # This is the same as the remote path
559 # since qemu accesses it directly.559 # since qemu accesses it directly.
560 return self.discover_volume(volume)560 return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name'])
561561
562 def ensure_export(self, context, volume):562 def ensure_export(self, context, volume):
563 """Synchronously recreates an export for a logical volume."""563 """Synchronously recreates an export for a logical volume."""
@@ -571,10 +571,8 @@
571 """Removes an export for a logical volume"""571 """Removes an export for a logical volume"""
572 pass572 pass
573573
574 def discover_volume(self, volume):574 def discover_volume(self, context, volume):
575 """Discover volume on a remote host"""575 """Discover volume on a remote host"""
576 # NOTE(justinsb): This is messed up... discover_volume takes 3 args
577 # but then that would break local_path
578 return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name'])576 return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name'])
579577
580 def undiscover_volume(self, volume):578 def undiscover_volume(self, volume):