Comment 14 for bug 1768876

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/pike)

Reviewed: https://review.openstack.org/571320
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=487c6dd778312780740d8cb9a0b51f3fa177c1c4
Submitter: Zuul
Branch: stable/pike

commit 487c6dd778312780740d8cb9a0b51f3fa177c1c4
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: 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.

    Conflicts:
          nova/cmd/manage.py
          nova/tests/functional/db/test_instance.py

    NOTE(mriedem): The conflicts are due to the following changes which
    were added in Queens:

      I6db4eb46df0d7ec025b969a46621823957503958

      I5b4b235b88367c361d38371d430d67ff583a906c

      I4b33751b6793f60c6f2703c379c36387c49d866d

    Change-Id: I2a1d81bfeb1ea006c16d8f403e045e9acedcbe57
    Closes-Bug: #1768876
    (cherry picked from commit 6b4c38c04177ff194d05368cd4aff69958075167)
    (cherry picked from commit 0a481a52929626c5fab8fd6fd50cca6882db3bd9)