Prevent temporary volume from being deleted accidentally
A temporary volume can be deleted while it is in use by DELETE API
accidentally because its status is `available`. To avoid this deletion,
this fix sets a value which doesn't accept deletion to volume status of
a temporary volume. When a temporary volume is used for backing up,
`backing-up` is set. When a temporary volume is used for reverting a
snapshot, `in-use` is set because the volume is attached by a host.
Closes-Bug: #1970768
Change-Id: Ib6a2e4d68e532b91161df5245c17ce815f12f935
(cherry picked from commit 53c13891b313d58923b223f6fbb1882e991f2785)
(cherry picked from commit d773fae8256f76ee78c81a5c07096a45227c6569)
Reviewed: https:/ /review. opendev. org/c/openstack /cinder/ +/831186 /opendev. org/openstack/ cinder/ commit/ cf2f3d07ae4eccb 4371d031fef992d 107e9c07c4
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit cf2f3d07ae4eccb 4371d031fef992d 107e9c07c4
Author: Hironori Shiina <email address hidden>
Date: Fri Jan 28 21:38:03 2022 -0500
Prevent temporary volume from being deleted accidentally
A temporary volume can be deleted while it is in use by DELETE API
accidentally because its status is `available`. To avoid this deletion,
this fix sets a value which doesn't accept deletion to volume status of
a temporary volume. When a temporary volume is used for backing up,
`backing-up` is set. When a temporary volume is used for reverting a
snapshot, `in-use` is set because the volume is attached by a host.
Closes-Bug: #1970768 91161df5245c17c e815f12f935 923b223f6fbb188 2e991f2785) e78c81a5c07096a 45227c6569)
Change-Id: Ib6a2e4d68e532b
(cherry picked from commit 53c13891b313d58
(cherry picked from commit d773fae8256f76e