From 25ae4bcc9139c612542b111ed9be68ea7a78794b Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Wed, 30 Nov 2016 17:31:18 +0800 Subject: [PATCH] Always allow to create snapshot db record with snapshot-manage Now, Cinder will raise 400 error when users manage a snapshot if the volume is in-use. We should allow this action in this situation. So set the "force=True" here when create the snapshot db record. Change-Id: Ic85ca0ec35a1711ecad6f08432b301ec1f82d6f2 Closes-bug: #1534350 --- cinder/volume/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 1faddd49d70..c444686db4e 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -1616,7 +1616,7 @@ class API(base.Base): metadata=None): service = self._get_service_by_host(context, volume.host, 'snapshot') snapshot_object = self.create_snapshot_in_db(context, volume, name, - description, False, + description, True, metadata, None, commit_quota=False) self.volume_rpcapi.manage_existing_snapshot(context, snapshot_object,