Reviewed: https://review.openstack.org/509206 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8e19ef4173906da0b7c761da4de0728a2fd71e24 Submitter: Zuul Branch: master
commit 8e19ef4173906da0b7c761da4de0728a2fd71e24 Author: Andrey Volkov <[email protected]> Date: Tue Oct 3 15:42:55 2017 +0300 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 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1378904 Title: renaming availability zone doesn't modify host's availability zone Status in OpenStack Compute (nova): Fix Released Bug description: Hi, After renaming our availability zones via Horizon Dashboard, we couldn't migrate any "old" instance anymore, the scheduler returning "No valid Host found"... After searching, we found in the nova DB `instances` table, the "availability_zone" field contains the name of the availability zone, instead of the ID ( or maybe it is intentional ;) ). So renaming AZ leaves the hosts created prior to this rename orphan and the scheduler cannot find any valid host for them... Our openstack install is on debian wheezy, with the icehouse "official" repository from archive.gplhost.com/debian/, up to date. If you need any more infos, I'd be glad to help. Cheers To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1378904/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

