← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1736874] [NEW] Mount a volume on second instances, and the information in cinder is not updated

 

Public bug reported:

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)

** Affects: nova
     Importance: Undecided
     Assignee: wanghongxu (wang19930902)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => wanghongxu (wang19930902)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1736874

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

Status in OpenStack Compute (nova):
  In Progress

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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1736874/+subscriptions