volume migration between different availability zones does not work

Bug #1550353 reported by Xuepeng Ji
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Unassigned

Bug Description

Currently volume migration bewteen different availability zones does not work. Sometimes the users need to migrate volume from one availability zone to another one. We shoud surpport this use case.

Test steps:
1. show all cinder hosts
cinder-manage host list
host zone
2C5_19_CG1 nova
2C5_19_CG1@lvm nova
2C5_19_CG2@lvm nova151
2C5_19_CG1@lvm2 nova
2C5_19_CG2@lvm2 nova151

2.create a volume and show the detail information
# cinder create 1 --name volume1 --volume-type lvm
# cinder show 45e13f9e-0d00-4c2a-bcee-01a9953e419b
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2016-02-26T09:33:55.000000 |
| description | None |
| encrypted | False |
| id | 45e13f9e-0d00-4c2a-bcee-01a9953e419b |
| metadata | {} |
| multiattach | False |
| name | volume1 |
| os-vol-host-attr:host | 2C5_19_CG1@lvm2#lvm |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 32bfe3124bb2478aad3e6aa1cee09f14 |
| os-volume-replication:driver_data | None |
| os-volume-replication:extended_status | None |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| user_id | 9134a1a11e5441c29e37757231f36450 |
| volume_type | lvm |
+---------------------------------------+--------------------------------------+

3. migrate the volume to cinder host 2C5_19_CG2@lvm2, which belongs to another availability zone.
cinder migrate 45e13f9e-0d00-4c2a-bcee-01a9953e419b 2C5_19_CG2@lvm2#lvm

4. error will be found in /var/log/cinder/scheduler.log
2016-02-26 17:41:18.397 28443 ERROR cinder.scheduler.manager [req-5783d33f-bfa5-499f-8f3f-30409558e04d 9134a1a11e5441c29e37757231f36450 32bfe3124bb2478aad3e6aa1cee09f14 - - -] Failed to schedule_migrate_volume_to_host: No valid host was found. Cannot place volume 45e13f9e-0d00-4c2a-bcee-01a9953e419b on 2C5_19_CG2@lvm2

Tags: migration
Xuepeng Ji (ji-xuepeng)
Changed in cinder:
status: New → Confirmed
Revision history for this message
Avishay Traeger (avishay-il) wrote :

I would not expect volume migration to work between AZs. Just as you cannot attach a volume to a VM in a different AZ, you cannot copy between volumes in two AZs.

Revision history for this message
Xuepeng Ji (ji-xuepeng) wrote :

If the configuration parameter 'cross_az_attach=true' is set in /etc/nova/nova.conf on compute nodes, we can attach a volume to a VM in a different AZ. Why volume migration between AZs doesn't be allowed?
VM can be migrated cross availability zones, volume migration cross AZs should be supported also.

In fact, our customers have such a requirement. They need to migrate VMs and their volumes from one AZ to another one before they begin to maintain the devices.

Xuepeng Ji (ji-xuepeng)
Changed in cinder:
assignee: nobody → Xuepeng Ji (ji-xuepeng)
Xuepeng Ji (ji-xuepeng)
tags: added: migration volume
tags: removed: volume
Xuepeng Ji (ji-xuepeng)
description: updated
summary: - volume migration bewteen different availability zones does not work
+ volume migration between different availability zones does not work
Changed in cinder:
importance: Undecided → Low
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Owner Expired

Unassigning due to no activity.

Changed in cinder:
assignee: Xuepeng Ji (ji-xuepeng) → nobody
haobing1 (haobing1)
Changed in cinder:
assignee: nobody → haobing1 (haobing1)
haobing1 (haobing1)
Changed in cinder:
assignee: haobing1 (haobing1) → nobody
assignee: nobody → haobing1 (haobing1)
Changed in cinder:
assignee: haobing1 (haobing1) → hongzhezheng (zheng-hongzhe32)
Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: hongzhezheng (zheng-hongzhe32) → nobody
status: In Progress → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/466181
Reason: No longer needed:

https://github.com/openstack/cinder/commit/fb8085894b69f56091bde19683a919cb15d502cc

Revision history for this message
Gorka Eguileor (gorka) wrote :

As far as I know volume migration between AZs has been working since Rocky.
I tested it when I fixed the AZ metadata: https://review.opendev.org/#/c/541779

Changed in cinder:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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