Metadata-API fails to retrieve avz for instances created before Pike
In Pike (through change: I8d426f2635232ffc4b510548a905794ca88d7f99)
we started setting instance.avilability_zone during schedule time by
calculating the avz of the host into which the instance was scheduled
into. After this change was introduced, the metadata request for the avz
on the instance (through change: I73c3b10e52ab4cfda9dacc0c0ba92d1fcb60bcc9)
started using instance.get(availability_zone) instead of doing the upcall.
However this would return None for instances older than Pike whose
availability_zone was not mentioned during boot time as it would be set to
CONF.default_schedule_zone whose default value is None.
This patch adds an online_migration tool to populate missing
instance.availability_zone values.
Change-Id: I2a1d81bfeb1ea006c16d8f403e045e9acedcbe57
Closes-Bug: #1768876
(cherry picked from commit 6b4c38c04177ff194d05368cd4aff69958075167)
Reviewed: https:/ /review. openstack. org/571317 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0a481a52929 626c5fab8fd6fd5 0cca6882db3bd9
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 0a481a52929626c 5fab8fd6fd50cca 6882db3bd9
Author: Surya Seetharaman <email address hidden>
Date: Fri May 11 17:12:34 2018 +0200
Metadata-API fails to retrieve avz for instances created before Pike
In Pike (through change: I8d426f2635232f fc4b510548a9057 94ca88d7f99) avilability_ zone during schedule time by fda9dacc0c0ba92 d1fcb60bcc9) get(availabilit y_zone) instead of doing the upcall. y_zone was not mentioned during boot time as it would be set to default_ schedule_ zone whose default value is None.
we started setting instance.
calculating the avz of the host into which the instance was scheduled
into. After this change was introduced, the metadata request for the avz
on the instance (through change: I73c3b10e52ab4c
started using instance.
However this would return None for instances older than Pike whose
availabilit
CONF.
This patch adds an online_migration tool to populate missing availability_ zone values.
instance.
Change-Id: I2a1d81bfeb1ea0 06c16d8f403e045 e9acedcbe57 94d05368cd4aff6 9958075167)
Closes-Bug: #1768876
(cherry picked from commit 6b4c38c04177ff1