Comment 10 for bug 1907775

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/766771
Committed: https://opendev.org/openstack/nova/commit/5bb6d4c18803fc2e70ce3e45459dd0f900e863cd
Submitter: "Zuul (22348)"
Branch: master

commit 5bb6d4c18803fc2e70ce3e45459dd0f900e863cd
Author: Stephen Finucane <email address hidden>
Date: Fri Dec 11 17:53:22 2020 +0000

    functional: Add reproducer for #1907775

    You can currently remove a host that has instances scheduled to it from
    an aggregate. If the aggregate is configured as part of an availability
    zone (AZ), this would in turn remove the host from the AZ, leaving
    instances originally scheduled to that AZ stranded on a host that is no
    longer a member of the AZ. This is clearly undesirable and should be
    blocked at the API level.

    You can also add a host to an aggregate where it wasn't in one before.
    Because nova provides a default AZ for hosts that don't belong to an
    aggregate, adding a host to an aggregate doesn't just assign it to an
    AZ, it removes it from the default 'nova' one (or whatever you've
    configured via '[DEFAULT] default_availability_zone'). As noted in the
    docs [1], people should not rely on scheduling to the default AZ, but if
    they had, we'd end up in the same situation as above.

    Add tests for both, with a fix coming after.

    [1] https://docs.openstack.org/nova/latest/admin/availability-zones.html

    Change-Id: I21f7f93ee0ec0cd3a290afba59342b31d074cf2f
    Signed-off-by: Stephen Finucane <email address hidden>
    Related-Bug: #1907775