Nova doesn't call migrate_volume_completion after cinder volume migration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Lee Yarwood | ||
Queens |
Fix Committed
|
Medium
|
Lee Yarwood | ||
Rocky |
Fix Committed
|
Medium
|
Lee Yarwood | ||
Stein |
Fix Committed
|
Medium
|
Lee Yarwood |
Bug Description
Originally reported in Red Hat Bugzilla: https:/
Create a cinder volume, attach it to a nova instance, and migrate the volume to a different storage host:
$ cinder create 1 --volume-type foo --name myvol
$ nova volume-attach myinstance myvol
$ cinder migrate myvol c-vol2
Everything seems to work correctly, but if we look at myinstance we see that it's now connected to a new volume, and the original volume is still present on the original storage host.
This is because nova didn't call cinder's migrate_
Note that there are 2 ways (that I'm aware of) to intiate a cinder volume migration: retype and migrate. AFAICT retype is *not* affected. In fact, I updated the relevant tempest test to try to trip it up and it didn't fail. However, an exlicit migrate *is* affected. They are different top-level entry points in cinder, and set different state, which is what triggers the Nova bug.
This appears to be a regression which was introduced by https:/
# Yes this is a tightly-coupled state check of what's going on inside
# cinder, but we need this while we still support old (v1/v2) and
# new style attachments (v3.44). Once we drop support for old style
# attachments we could think about cleaning up the cinder-initiated
# swap volume API flows.
True if old_volume[
There's a bug here because AFAICT cinder never sets status to 'migrating' during any operation: it sets migration_status to 'migrating' during both retype and migrate. During retype it sets status to 'retyping', but not during an explicit migrate.
tags: | added: cinder volumes |
Changed in nova: | |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. openstack. org/618717
Review: https:/