Migrate attached volume failed

Bug #1316079 reported by Shaocong Liang
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
git-harry
OpenStack Compute (nova)
Fix Released
Medium
git-harry

Bug Description

In nova compute log, met a exception when migrating the attached volume.
File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/nova/nova/compute/manager.py", line 301, in decorated_function
return function(self, context, *args, **kwargs)
File "/opt/stack/nova/nova/compute/manager.py", line 4337, in swap_volume
new_volume_id)
File "/opt/stack/nova/nova/compute/manager.py", line 4317, in _swap_volume
mountpoint)
File "/opt/stack/nova/nova/volume/cinder.py", line 173, in wrapper
res = method(self, ctx, volume_id, *args, **kwargs)
File "/opt/stack/nova/nova/volume/cinder.py", line 261, in attach
mountpoint)
File "/opt/stack/python-cinderclient/cinderclient/v1/volumes.py", line 266, in attach
'mode': mode})
File "/opt/stack/python-cinderclient/cinderclient/v1/volumes.py", line 250, in _action
return self.api.client.post(url, body=body)
File "/opt/stack/python-cinderclient/cinderclient/client.py", line 223, in post
return self._cs_request(url, 'POST', **kwargs)
File "/opt/stack/python-cinderclient/cinderclient/client.py", line 187, in _cs_request
**kwargs)
File "/opt/stack/python-cinderclient/cinderclient/client.py", line 170, in request
raise exceptions.from_response(resp, body)
VolumeNotFound: Volume fdb681d1-2de9-4193-8f4e-775d21301512 could not be found.

Revision history for this message
Shaocong Liang (lscong666) wrote :
git-harry (git-harry)
Changed in cinder:
assignee: nobody → git-harry (git-harry)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
git-harry (git-harry) wrote :

Nova fix (not sure why it didn't appear automatically) -> https://review.openstack.org/#/c/101933/

Changed in nova:
status: New → In Progress
Tracy Jones (tjones-i)
Changed in nova:
status: In Progress → Triaged
status: Triaged → In Progress
assignee: nobody → git-harry (git-harry)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/101932
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=31ad23c4820048ca13e0948e28d2a90ad228b09c
Submitter: Jenkins
Branch: master

commit 31ad23c4820048ca13e0948e28d2a90ad228b09c
Author: git-harry <email address hidden>
Date: Mon Jun 23 15:47:34 2014 +0100

    Fix retyping attached volumes requiring migration

    Modifies retype method so that volume db entry only updated if the
    volume isn't migrated.

    The migrate_volume_completion method is made responsible for detaching
    the old volume and attaching the new one. This takes the requirement
    from nova because the calls need to be done in a certain order which
    isn't guaranteed when performed by nova.

    attach_volume now marks the migration_status as complete because it is
    the final action by cinder.

    Change-Id: Ia15636893be4f0077a4f75e746a8ab1a8798c44b
    Partial-Bug: 1316079

Tracy Jones (tjones-i)
Changed in nova:
importance: Undecided → Medium
Changed in cinder:
status: In Progress → Fix Committed
milestone: none → juno-2
importance: Undecided → Medium
Changed in cinder:
status: Fix Committed → Fix Released
Revision history for this message
Tracy Jones (tjones-i) wrote :

anything left to do for this bug? All reviews have merged

Revision history for this message
John Griffith (john-griffith) wrote :

Tracy, still waiting for the Nova change to land:
https://review.openstack.org/#/c/101933/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Tomoki Sekiyama (<email address hidden>) on branch: master
Review: https://review.openstack.org/110150
Reason: As this is already fixed by git-harry, I'll close this, thank you.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/108195
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=910575997ef9700ef2482705d79a1df013c7e554
Submitter: Jenkins
Branch: master

commit 910575997ef9700ef2482705d79a1df013c7e554
Author: git-harry <email address hidden>
Date: Sat Jul 19 11:25:29 2014 +0100

    Fixes migrate_volume_completion

    The following issues are addressed:

    The source volume is never deleted when a migration is done because
    status_update was assumed to always be a dict.

    Unattached volumes are set to in-use when retyped.

    In-use migrated volumes are left in status attaching.

    Change-Id: Ib5034679a5f469ba53e6280a47e8c94d633cf911
    Partial-Bug: 1316079

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 98739761f17b5e0b32abd8cd262f5beda030f886
Author: git-harry <email address hidden>
Date: Mon Jun 23 16:11:37 2014 +0100

    Fix swap_volumes

    The attach and detach calls to cinder are better handled by cinder this
    patch removes them. There is another patch against this bug to modify
    cinder.

    The attach call is being made against the new volume after the
    migrate_volume_completion request. This means it may be done after the
    new volume ID in the db has been deleted.

    The detach call is being run at the end on the old ID and so may end up
    detaching the migrated volume from cinder's perspective.

    Change-Id: I3f2d98e9e473905a3de2f02e00c92ae3065e6ae7
    Partial-Bug: 1316079

Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-2 → 2014.2
Changed in nova:
status: In Progress → Fix Committed
tags: added: juno-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/181403

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/181404

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/icehouse)

Change abandoned by Matthew Booth (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/181404
Reason: Doesn't meet current stable criteria for Icehouse.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Matthew Booth (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/181403
Reason: Doesn't meet current stable criteria for Icehouse.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.