Mount a volume on second instances, and the information in cinder is not updated

Bug #1736874 reported by wanghongxu on 2017-12-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
wanghongxu

Bug Description

Description
===========
If you attach a volume to two instances, you will
see that the state of the volume is always attaching.
The state of the volume should not be used to determine
whether or not the cinder is called.

Steps to reproduce
==================
cinder type-create multiattach-type
cinder type-key multiattach-type set "multiattach=<is> True"

cinder create --name multiattach-disk --volume-type multiattach-type --allow-multiattach 1

nova volume-attach instance-id-1 volume-id
nova volume-attach instance-id-2 volume-id

Expected result
===============
volume status is in-use

Actual result
=============
volume status is attaching

code
====
https://github.com/openstack/nova/blob/9aab64558d68ccbd4237cdd3623f1a0f01df3aa6/nova/virt/block_device.py#L406
        if volume['attach_status'] == "detached":
                volume_api.attach(context, volume_id, instance.uuid,
                                  self['mount_device'], mode=mode)

wanghongxu (wang19930902) wrote :
Changed in nova:
assignee: nobody → wanghongxu (wang19930902)
Changed in nova:
status: New → In Progress

Change abandoned by wanghongxu (<email address hidden>) on branch: master
Review: https://review.openstack.org/525540

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers