From 0a34a5a29d3c8fd872ca887415e73f04224b7c01 Mon Sep 17 00:00:00 2001 From: caixiaoyu Date: Tue, 18 Dec 2018 15:23:17 +0800 Subject: [PATCH] Reset snapshot status available This patch fix bug: After fail to revert volume to snapshot, the snapshot status will be set to available. Depend on Line 1007, Line 1012 should be fields.SnapshotStatus.AVAILABLE. Change-Id: Ic6b03e6de3de4498dc63f9ab4f77ace025ff28c6 --- cinder/volume/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 5e4ba4f087a..1863188fbc6 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -1009,7 +1009,7 @@ class VolumeManager(manager.CleanableManager, if not s_res: msg_args = {"id": snapshot.id, "status": - fields.SnapshotStatus.ERROR} + fields.SnapshotStatus.AVAILABLE} msg += ("Failed to reset snapshot %(id)s " "status to %(status)s." % msg_args) LOG.exception(msg, msg_args)