AvailabilityZoneFilter returns a wrong result because of the availablity_zone in the instances table has not be updated

Bug #1677097 reported by zengrui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
wind

Bug Description

When you do a live-migration for an instance from one zone to another successfully or you change the zone of
the compute node which the instance launched on, but the availablity_zone of this instance in the instances table won't be updated.
Then when you do a cold_migrate or resize the instance, the AvailabilityZoneFilter will get a wrong zone of the instance, and the filter result must be wrong, and maybe you won't get the result you want for the cold_migrate or resize.

Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

Could you please provide the steps you have used to reproduce this, it helps to understand better and also helps to reproduce the issue.

Revision history for this message
zengrui (zengrui) wrote :

If you only have two compute nodes, compute1 in zone1, and compute2 in zone2.
1. Create an instance in zone1;
2. Do a live_migration for the instance from compute1 to compute2, you can specify the destination node here;
3. The availablity_zone of the instance in the table instances is also zone1;
4. Then you can do a cold_migrate for the instance, you can migrate the instance from zone2 to zone1 successfully because of the instance's availablity_zone is wrong in the database;
5. And if you change the zone1's name or delete compute1 from zone1, then you may get an unexcepted result when you do a cold_migrate for the instance or resize the instance.

tags: added: availability-zones
tags: added: scheduler
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
wind (better)
Changed in nova:
assignee: nobody → wind (better)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.opendev.org/491226
Reason: As noted by Kevin, the AvailabilityZoneFilter uses the RequestSpec not the instance so this is a bit off anyway, but like I said I think this is already fixed.

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.