Nova allows a non-multiattach volume to be attached to multiple instances *if* its volume state is reset by an admin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Lee Yarwood |
Bug Description
Description
===========
$subject, this is an odd little corner case but if an admin resets the state of an attached volume to available there are no checks within n-api stopping a user from attaching the volume to another instance, regardless of the original bdm record.
Steps to reproduce
==================
1. Attach a volume to an instance.
2. Reset the state of the volume to available.
3. Attach the volume to another instance.
Expected result
===============
The second request to attach a volume should be rejected by Nova until the attachment is removed.
Actual result
=============
The volume is attached to both instances in Nova but a single instance in Cinder.
Environment
===========
1. Exact version of OpenStack you are running. See the following
list for all releases: http://
master
2. Which hypervisor did you use?
(For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
What's the version of that?
N/A
2. Which storage type did you use?
(For example: Ceph, LVM, GPFS, ...)
What's the version of that?
N/A
3. Which networking type did you use?
(For example: nova-network, Neutron with OpenVSwitch, ...)
N/A
Logs & Configs
==============
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
status: | In Progress → Fix Released |
I'm not sure this is a real bug. When the admin resets the state of the volume it basically declares that the volume is unused. I think the admin failed to make sure that the volume is really unused when they reset the state of the volume.