Comment 6 for bug 1210483

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

Reviewed: https://review.openstack.org/43279
Committed: http://github.com/openstack/nova/commit/c51f23834db599558098e38a7b4ccd7ef1c49a95
Submitter: Jenkins
Branch: master

commit c51f23834db599558098e38a7b4ccd7ef1c49a95
Author: zhhuabj <email address hidden>
Date: Thu Aug 22 20:11:08 2013 +0800

    Should finish allocating network before VM reaches ACTIVE

    This patch can fix issues like tempest caused by async
    network allocation. Nova uses NetworkInfoAsyncWrapper
    to allocate network in an async manner, and this allows
    one to start querying for network info before you know
    you will need it. Nova will invoke refresh_cache method
    to update instance_cache_info after excuting the
    allocate_for_instance method as well.

    However, nova rest api will query instance_cache_info
    directly, thus maybe get the empty network info before
    instance_cache_info table has been updated asynchronously.
    Thus will cause VM can exist without a known address
    accidentally, the caller is difficult to distinguish
    this situation, unless waiting for some internal process
    or it will not have an address. So should finish
    allocating network before the VM reaches ACTIVE status.
    For more detail can refer the bug description.

    BTW, almost all create server related unit tests have
    coverred this case.

    Closes-Bug: #1210483
    Change-Id: Iab542df1be7d5c9661d717ec596d2a37b975169a