Handle upgrades with drop of AvailabilityZoneFilter in bobcat

Bug #2036766 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Charm Guide
Fix Released
Undecided
Unassigned
OpenStack Nova Cloud Controller Charm
Fix Committed
High
Unassigned

Bug Description

The AvailabilityZoneFilter was removed from nova in bobcat.

The was removed from upstream nova in the 2023.2 cycle
via commit 5edd805fe2395f35ecdfe5b589a51dc00565852f.

The nova release note states:

The ``AvailabilityZoneFilter`` was deprecated for removal
in 24.0.0 (Xena) and has now been removed.
The functionality of the``AvailabilityZoneFilter`` has been
replaced by the``map_az_to_placement_aggregate`` pre-filter.
The pre-filter was introduced in 18.0.0 (Rocky) and enabled
by default in 24.0.0 (Xena). This pre-filter is now always
enabled and the ``[scheduler] query_placement_for_availability_zone``
config option has been removed.

There are likely migration considerations here for the charms where placement aggregates will need updating on upgrade to bobcat or C (SLURP) in order for users to target availability zones on instance creation (needs testing). New bobcat or C deploys should be okay [1] (but also needs testing).

Relevant docs:

https://docs.openstack.org/nova/latest/admin/availability-zones.html#availability-zones-with-placement
https://docs.openstack.org/nova/latest/admin/aggregates.html#aggregates-in-placement

[1] Note (from 2nd link above):

The nova-api service attempts (as of nova 18.0.0) to automatically mirror the association of a compute host with an aggregate when an administrator adds or removes a host to/from a nova host aggregate. This should alleviate the need to manually create those association records in the placement API using the openstack resource provider aggregate set CLI invocation.

I started a review here: https://review.opendev.org/c/openstack/charm-nova-cloud-controller/+/895840

Changed in charm-nova-cloud-controller:
status: New → Triaged
Changed in charm-placement:
status: New → Triaged
importance: Undecided → High
Changed in charm-nova-cloud-controller:
importance: Undecided → High
Changed in charm-nova-cloud-controller:
status: Triaged → In Progress
Revision history for this message
Corey Bryant (corey.bryant) wrote (last edit ):

I tested the following successfully for this change:

Note: Fix for the following is required for upgrades: https://bugs.launchpad.net/charm-nova-cloud-controller/+bug/2037751

== upgrade ==

# deploy jammy-zed
openstack aggregate create ag-zed
openstack aggregate set --property availability_zone=az-zed ag-zed
openstack aggregate add host ag-zed $(openstack hypervisor list --column 'Hypervisor Hostname' --sort-column 'Hypervisor Hostname' --format value | grep 14)
openstack server create az-zed-on-zed --availability-zone az-zed --image cirros --flavor m1.tiny --nic net-id=private
openstack server show --column hypervisor_hostname --column availability_zone az-zed-on-zed

# upgrade to antelope
openstack aggregate create ag-antelope
openstack aggregate set --property availability_zone=az-antelope ag-antelope
openstack aggregate add host ag-antelope $(openstack hypervisor list --column 'Hypervisor Hostname' --sort-column 'Hypervisor Hostname' --format value | grep 15)
openstack server create az-antelope-on-antelope --availability-zone az-antelope --image cirros --flavor m1.tiny --nic net-id=private
openstack server create az-zed-on-antelope --availability-zone az-zed --image cirros --flavor m1.tiny --nic net-id=private
openstack server show --column hypervisor_hostname --column availability_zone az-antelope-on-antelope
openstack server show --column hypervisor_hostname --column availability_zone az-zed-on-antelope

# upgrade to bobcat
openstack aggregate create ag-bobcat
openstack aggregate set --property availability_zone=az-bobcat ag-bobcat
openstack aggregate add host ag-bobcat $(openstack hypervisor list --column 'Hypervisor Hostname' --sort-column 'Hypervisor Hostname' --format value | grep 16)
openstack server create az-bobcat-on-bobcat --availability-zone az-bobcat --image cirros --flavor m1.tiny --nic net-id=private
openstack server create az-antelope-on-bobcat --availability-zone az-antelope --image cirros --flavor m1.tiny --nic net-id=private
openstack server create az-zed-on-bobcat --availability-zone az-zed --image cirros --flavor m1.tiny --nic net-id=private
openstack server show --column hypervisor_hostname --column availability_zone az-bobcat-on-bobcat
openstack server show --column hypervisor_hostname --column availability_zone az-antelope-on-bobcat
openstack server show --column hypervisor_hostname --column availability_zone az-zed-on-bobcat

== new bobcat deploy ==

# deploy jammy-bobcat
openstack aggregate create ag-bobcat
openstack aggregate set --property availability_zone=az-bobcat ag-bobcat
openstack aggregate add host ag-bobcat $(openstack hypervisor list --column 'Hypervisor Hostname' --sort-column 'Hypervisor Hostname' --format value | grep 16)
openstack server create az-bobcat-on-bobcat --availability-zone az-bobcat --image cirros --flavor m1.tiny --nic net-id=private
openstack server show --column hypervisor_hostname --column availability_zone az-bobcat-on-bobcat

no longer affects: charm-placement
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-guide (master)
Changed in charm-guide:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.opendev.org/c/openstack/charm-nova-cloud-controller/+/895840
Committed: https://opendev.org/openstack/charm-nova-cloud-controller/commit/5cf66c87c797e4f7549bc7cd9f5d57c624d30d00
Submitter: "Zuul (22348)"
Branch: master

commit 5cf66c87c797e4f7549bc7cd9f5d57c624d30d00
Author: Corey Bryant <email address hidden>
Date: Tue Sep 19 14:00:33 2023 -0400

    Drop AvailabilityZoneFilter inline with upstream removal

    The was removed from upstream nova in the 2023.2 cycle
    via commit 5edd805fe2395f35ecdfe5b589a51dc00565852f.

    The nova release note states:

    The ``AvailabilityZoneFilter`` was deprecated for removal
    in 24.0.0 (Xena) and has now been removed.
    The functionality of the``AvailabilityZoneFilter`` has been
    replaced by the``map_az_to_placement_aggregate`` pre-filter.
    The pre-filter was introduced in 18.0.0 (Rocky) and enabled
    by default in 24.0.0 (Xena). This pre-filter is now always
    enabled and the ``[scheduler] query_placement_for_availability_zone``
    config option has been removed.

    This change also syncs the charm-helpers change from:
    https://github.com/juju/charm-helpers/pull/850

    Closes-Bug: #2037751
    Closes-Bug: #2036766
    Change-Id: I315900a7e32ec66b27fa69961e9b7dcb9fa1f949

Changed in charm-nova-cloud-controller:
status: In Progress → Fix Committed
Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-guide (master)

Reviewed: https://review.opendev.org/c/openstack/charm-guide/+/897070
Committed: https://opendev.org/openstack/charm-guide/commit/16b35ea4b2c5de7e7de2e8fdcf05e61322f30a32
Submitter: "Zuul (22348)"
Branch: master

commit 16b35ea4b2c5de7e7de2e8fdcf05e61322f30a32
Author: Corey Bryant <email address hidden>
Date: Mon Oct 2 12:06:02 2023 -0400

    Nova AvailabilityZoneFilter removal in Bobcat

    Add documentation discussing AvailabilityZoneFilter removal in
    Bobcat, including expected behavior and commands for determining
    whether host aggregates have been mirrored to placement aggregates.

    Closes-Bug: #2036766
    Change-Id: I5543c960791617d2e7083aa989d97f3dc233ee86

Changed in charm-guide:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.