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
1=== modified file 'Authors'
2--- Authors 2011-04-07 23:08:15 +0000
3+++ Authors 2011-04-12 05:22:36 +0000
4@@ -74,5 +74,6 @@
5 Tushar Patil <tushar.vitthal.patil@gmail.com>
6 Vasiliy Shlykov <vash@vasiliyshlykov.org>
7 Vishvananda Ishaya <vishvananda@gmail.com>
8+Yoshiaki Tamura <yoshi@midokura.jp>
9 Youcef Laribi <Youcef.Laribi@eu.citrix.com>
10 Zhixue Wu <Zhixue.Wu@citrix.com>
11
12=== modified file 'nova/volume/driver.py'
13--- nova/volume/driver.py 2011-03-28 23:42:28 +0000
14+++ nova/volume/driver.py 2011-04-12 05:22:36 +0000
15@@ -557,7 +557,7 @@
16 """Returns the path of the rbd volume."""
17 # This is the same as the remote path
18 # since qemu accesses it directly.
19- return self.discover_volume(volume)
20+ return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name'])
21
22 def ensure_export(self, context, volume):
23 """Synchronously recreates an export for a logical volume."""
24@@ -571,10 +571,8 @@
25 """Removes an export for a logical volume"""
26 pass
27
28- def discover_volume(self, volume):
29+ def discover_volume(self, context, volume):
30 """Discover volume on a remote host"""
31- # NOTE(justinsb): This is messed up... discover_volume takes 3 args
32- # but then that would break local_path
33 return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name'])
34
35 def undiscover_volume(self, volume):