From: liuke2 Date: Tue, 16 Feb 2016 11:07:12 +0000 (+0800) Subject: Huawei: Create snapshot have a log error X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ff293a3e487f0159d94b93cdcfd7bd1dd91cf3e8;p=openstack-build%2Fcinder-build.git 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 --- 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)