From e64b84aab8204b0f2acfbd2b2285e8c4118fbe6d Mon Sep 17 00:00:00 2001 From: John Griffith Date: Tue, 16 Jun 2015 13:15:43 -0600 Subject: [PATCH] Fix broken export commands on block_device driver When I implemented the new target driver code the methods used for LVM were copy pasted: commit 9651f547147188645942466602c92cce06666483 I screwed this up because the block_device driver doesn't use LVM at all. This patch sets it back the way it should be and just uses the local dev file of the whole disk. Change-Id: Ife88d5597df27dcd668a9a361bebccbc840ca2d4 Closes-Bug: #1465819 --- cinder/volume/drivers/block_device.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cinder/volume/drivers/block_device.py b/cinder/volume/drivers/block_device.py index cfe876638..bed0c5867 100644 --- a/cinder/volume/drivers/block_device.py +++ b/cinder/volume/drivers/block_device.py @@ -191,8 +191,7 @@ class BlockDeviceDriver(driver.BaseVD, driver.LocalVD, driver.CloneableVD, # ####### Interface methods for DataPath (Target Driver) ######## def ensure_export(self, context, volume): - volume_path = "/dev/%s/%s" % (self.configuration.volume_group, - volume['name']) + volume_path = self.local_path(volume) model_update = \ self.target_driver.ensure_export( context, @@ -201,8 +200,7 @@ class BlockDeviceDriver(driver.BaseVD, driver.LocalVD, driver.CloneableVD, return model_update def create_export(self, context, volume): - volume_path = "/dev/%s/%s" % (self.configuration.volume_group, - volume['name']) + volume_path = self.local_path(volume) export_info = self.target_driver.create_export(context, volume, volume_path) -- 2.45.2