← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1819963] [NEW] Reverting a resize does not update the instance.availability_zone value to the source az

 

Public bug reported:

With this change in pike: https://review.openstack.org/#/c/446053/ -
when resizing a server the instance.availability_zone is changed to
whatever zone the destination host is in.

For a server that is created with an explicit AZ, the resize is
restricted to the same AZ via the AvailabilityZoneFilter. For a server
that is not created with an explicit AZ and
https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.default_schedule_zone
is None (the default), the server is free to "move" between zones.

The bug is that when a server is resized and moves from zone 1 to zone
2, if the resize is reverted, nothing updates the
instance.availability_zone value back to the original zone even though
the server is on the original source host in the initial zone.

Note that the API hides this a bit when showing the instance AZ:

https://github.com/openstack/nova/blob/482f4fed654f384e8fb277c504a14a6407ba2e7b/nova/availability_zones.py#L179-L194

If the instance.availability_zone value in the database does not match
the cached zone that the instance.host is in, the API will return the
zone for the host rather than the instance.availability_zone value. But
the instance.availability_zone value in the database is still incorrect.

** Affects: nova
     Importance: Low
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged


** Tags: availability-zones resize

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1819963

Title:
  Reverting a resize does not update the instance.availability_zone
  value to the source az

Status in OpenStack Compute (nova):
  Triaged

Bug description:
  With this change in pike: https://review.openstack.org/#/c/446053/ -
  when resizing a server the instance.availability_zone is changed to
  whatever zone the destination host is in.

  For a server that is created with an explicit AZ, the resize is
  restricted to the same AZ via the AvailabilityZoneFilter. For a server
  that is not created with an explicit AZ and
  https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.default_schedule_zone
  is None (the default), the server is free to "move" between zones.

  The bug is that when a server is resized and moves from zone 1 to zone
  2, if the resize is reverted, nothing updates the
  instance.availability_zone value back to the original zone even though
  the server is on the original source host in the initial zone.

  Note that the API hides this a bit when showing the instance AZ:

  https://github.com/openstack/nova/blob/482f4fed654f384e8fb277c504a14a6407ba2e7b/nova/availability_zones.py#L179-L194

  If the instance.availability_zone value in the database does not match
  the cached zone that the instance.host is in, the API will return the
  zone for the host rather than the instance.availability_zone value.
  But the instance.availability_zone value in the database is still
  incorrect.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1819963/+subscriptions


Follow ups