Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check hosts have no instances for AZ rename
Update aggregate and update aggregate metadata API calls have the ability to update availability zone name for the aggregate. If the aggregate is not empty (has hosts with instances on it) the update leads to discrepancy for objects saving availability zone as a string but not reference. From devstack DB they are: - cinder.backups.availability_zone - cinder.consistencygroups.availability_zone - cinder.groups.availability_zone - cinder.services.availability_zone - cinder.volumes.availability_zone - neutron.agents.availability_zone - neutron.networks.availability_zone_hints - neutron.router_extra_attributes.availability_zone_hints - nova.dns_domains.availability_zone - nova.instances.availability_zone - nova.volume_usage_cache.availability_zone - nova.shadow_dns_domains.availability_zone - nova.shadow_instances.availability_zone - nova.shadow_volume_usage_cache.availability_zone Why that's bad? First, API and Horizon show different values for host and instance for example. Second, migration for instances with changed availability zone fails with "No valid host found" for old AZ. This change adds an additional check to aggregate an Update Aggregate API call. With the check, it's not possible to rename AZ if the corresponding aggregate has instances in any hosts. PUT /os-aggregates/{aggregate_id} and POST /os-aggregates/{aggregate_id}/action return HTTP 400 for availability zone renaming if the hosts of the aggregate have any instances. It's similar to conflicting AZ names error already available. Change-Id: Ic27195e46502067c87ee9c71a811a3ca3f610b73 Closes-Bug: #1378904
- Loading branch information
Showing
5 changed files
with
151 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/bug-1378904-disable-az-rename-b22a558a20b12706.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
``PUT /os-aggregates/{aggregate_id}`` and | ||
``POST /os-aggregates/{aggregate_id}/action`` (for set_metadata action) will | ||
now return HTTP 400 for availability zone renaming if the hosts of | ||
the aggregate have any instances. |