target removal on detaching volume with multi-attach flag

Bug #1471278 reported by Chris Gacsal on 2015-07-03
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Medium
Unassigned
OpenStack Compute (nova)
Low
Unassigned

Bug Description

Cinder-volume removes target on detaching volume with multi-attach flag even
if the volume still has attachments.
This bug has been found during the development of volume-multi-attach support for nova.

To reproduce it in devstack:
- get multi-attach support for nova: https://review.openstack.org/#/c/153038/
- create a volume with multi-attach flag: cinder create 1 --allow-multiattach
- create two instances (host was the same for both vms in our case)
- attach volume to the instances
- check iscsi target: tgtadm --lld iscsi --mode target --op show
- check iscsi session: iscsiadm -m session -P 3
- detach the volume from one of the vms
- check iscsi target/session again

Changed in cinder:
assignee: nobody → Chris Gacsal (chris-gacsal)
Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: Chris Gacsal (chris-gacsal) → nobody

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

Sean McGinnis (sean-mcginnis) wrote :

A cinder detach should not be called if it is just being removed from an instance on the same host. Detach is only needed when a hypervisor host no longer needs the volume for any instances.

Changed in cinder:
status: In Progress → Invalid
Ildiko Vancsa (ildiko-vancsa) wrote :

As multi-attach use cases are handled now on per instance basis this bug is still valid and needs to be fixed.

Changed in cinder:
status: Invalid → New
Changed in cinder:
assignee: nobody → Walt Boring (walter-boring)

Fix proposed to branch: master
Review: https://review.openstack.org/255595

Changed in cinder:
status: New → In Progress
Changed in cinder:
importance: Undecided → Medium
Matt Riedemann (mriedem) on 2015-12-22
Changed in nova:
assignee: nobody → Ildiko Vancsa (ildiko-vancsa)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/266006

Reviewed: https://review.openstack.org/266006
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=3632173486f89d541c121be8e041a1da636edf32
Submitter: Jenkins
Branch: master

commit 3632173486f89d541c121be8e041a1da636edf32
Author: Walter A. Boring IV <email address hidden>
Date: Mon Jan 11 03:43:09 2016 -0800

    Allow host and instance_uuid at attach

    This patch removes the restriction on passing both
    host name and instance_uuid during os-attach call.

    Change-Id: I2a66920a76d3abfd6da384d2dd963f054ce61c03
    Partial-Bug: #1471278

Matt Riedemann (mriedem) on 2016-01-14
tags: added: volumes
Changed in cinder:
assignee: Walt Boring (walter-boring) → Chhavi Agarwal (chhagarw)

Reviewed: https://review.openstack.org/256273
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d31bb4be8edbce6719258ae1cbbb583a2c3c3a28
Submitter: Jenkins
Branch: master

commit d31bb4be8edbce6719258ae1cbbb583a2c3c3a28
Author: Ildiko Vancsa <email address hidden>
Date: Thu Dec 10 21:29:11 2015 +0100

    Pass host when call attach to Cinder

    The lvm driver needs the host name information in order to be able to
    provide detach properly. This patch adds the host information to the
    attach call under virt/block_device and in volumer/cinder.

    Partial-Bug: #1471278

    Change-Id: I2c19f7a09299ceb266921f97f40354fb2ed76716

Fix proposed to branch: master
Review: https://review.openstack.org/300684

Changed in cinder:
assignee: Chhavi Agarwal (chhagarw) → Scott DAngelo (scott-dangelo)

Change abandoned by Scott DAngelo (<email address hidden>) on branch: master
Review: https://review.openstack.org/300684
Reason: We're taking a new path for fixing issues with Volume multi-attach. This is no longer needed.

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/255595
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Maciej Szankin (mszankin) wrote :

This bug report has an assignee for a while now but there is no patch
for that. It looks like that the chance of getting a patch is low.
I'm going to remove the assignee to signal to others that they can take
over if they like.
If you want to work on this, please:
* add yourself as assignee AND
* set the status to "In Progress" AND
* provide a (WIP) patch within the next 2 weeks after that.
If you need assistance, reach out on the IRC channel #openstack-nova or
use the mailing list.

Also tagging as New. It is old and requires to be verified.

Changed in cinder:
status: In Progress → New
Changed in nova:
status: In Progress → New
assignee: Ildiko Vancsa (ildiko-vancsa) → nobody
Changed in cinder:
assignee: Scott DAngelo (scott-dangelo) → nobody
Sean Dague (sdague) wrote :

Is this still a known issue? If so, please put in the Confirmed state.

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Incomplete
Ildiko Vancsa (ildiko-vancsa) wrote :

We are on our way to implement a lock mechanism on top of the built-in protection on the Cinder side not to remove targets when there are still active connections.

References:

shared_targets flag to volume details: https://review.openstack.org/#/c/509005/
multiattach spec for Nova: https://review.openstack.org/#/c/499777/

Ildiko Vancsa (ildiko-vancsa) wrote :

Multi-attach functionality is now implemented in both Cinder and Nova, which should make this bug invalid. In case the symptom appears again the bug shall be re-opened.

Blueprint page with more details: https://blueprints.launchpad.net/nova/+spec/multi-attach-volume

Changed in nova:
status: Incomplete → Invalid
Changed in cinder:
status: New → Fix Committed
Changed in cinder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers