From c09a92f6aae7c9c57d555e517f131608b7ec4c5e Mon Sep 17 00:00:00 2001 From: Jacob Gregor Date: Fri, 4 Sep 2015 16:30:12 -0500 Subject: [PATCH] Error message in update_migrated_volume was incorrect If an error was encountered in self.vg.rename_volume the error message tried to use volume['name'], which is an invalid key. The invalid key error would then cause the retype/migration to abort in the middle of the process and leave original and temporary volume in place. This patch fixes this bug by providing a valid key. Change-Id: I73e1335c649df41d5167efc3cb4b9af48a5d537d Closes-bug: #1492462 --- cinder/volume/drivers/lvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 6a54eb3c6..d38eeaea8 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -355,7 +355,7 @@ class LVMVolumeDriver(driver.VolumeDriver): self.vg.rename_volume(current_name, original_volume_name) except processutils.ProcessExecutionError: LOG.error(_LE('Unable to rename the logical volume ' - 'for volume: %s'), volume['name']) + 'for volume: %s'), volume['id']) # If the rename fails, _name_id should be set to the new # volume id and provider_location should be set to the # one from the new volume as well. -- 2.45.2