From ff293a3e487f0159d94b93cdcfd7bd1dd91cf3e8 Mon Sep 17 00:00:00 2001 From: liuke2 Date: Tue, 16 Feb 2016 19:07:12 +0800 Subject: [PATCH] Huawei: Create snapshot have a log error When creating snapshot, if the volume does not exist there will be lead to a log error. This patch will fix this. Closes-Bug:#1545912 Change-Id:Ic99531dad4fab5e22e295e19bbfa94c7892e3ddc --- cinder/volume/drivers/huawei/huawei_driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/huawei/huawei_driver.py b/cinder/volume/drivers/huawei/huawei_driver.py index 002612bba..cb3855f72 100644 --- a/cinder/volume/drivers/huawei/huawei_driver.py +++ b/cinder/volume/drivers/huawei/huawei_driver.py @@ -707,8 +707,8 @@ class HuaweiBaseDriver(driver.VolumeDriver): def create_snapshot(self, snapshot): volume = snapshot.get('volume') if not volume: - msg = (_("Can't find volume id from db, volume: %(id)s") % - {"id": volume['id']}) + msg = (_("Can't get volume id from snapshot, snapshot: %(id)s") + % {"id": snapshot['id']}) LOG.error(msg) raise exception.VolumeBackendAPIException(data=msg) -- 2.45.2