From 1ab2fc6477c402e29a95fbc93fe4a67950c083df Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Thu, 20 Dec 2012 03:13:01 +0000 Subject: Remove availability_zones from service table This is the final step in enabling availability_zones using aggregate metadata. Previously all services had an availability_zone, but the availability_zone is only used for nova-compute. Services such as nova-scheduler, nova-network, nova-conductor have always spanned all availability_zones. After this change only compute nodes (nova-compute), will have an availability_zone. In order to preserve current APIs, when running: * nova host-list (os-hosts) * euca-describe-availability-zones verbose * nova-manage service list Internal services will appear in there own internal availability_zone (CONF.internal_service_availability_zone) Internal zone is hidden in euca-describe-availability_zones (non-verbose) CONF.node_availability_zone has been renamed to CONF.default_availability_zone and is only used by the nova-api and nova-scheduler. CONF.node_availability_zone still works but is deprecated DocImpact Completes blueprint aggregate-based-availability-zones Change-Id: Ib772df5f9ac2865f20df479f8ddce575a9ce3aff --- nova/compute/api.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index 4ac04e790..c7a1d6126 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -2241,11 +2241,6 @@ class AggregateAPI(base.Base): # validates the host; ComputeHostNotFound is raised if invalid service = self.db.service_get_all_compute_by_host(context, host)[0] aggregate = self.db.aggregate_get(context, aggregate_id) - if service['availability_zone'] != aggregate['availability_zone']: - raise exception.InvalidAggregateAction( - action='add host', - aggregate_id=aggregate_id, - reason='availability zone mismatch') self.db.aggregate_host_add(context, aggregate_id, host) #NOTE(jogo): Send message to host to support resource pools self.compute_rpcapi.add_aggregate_host(context, -- cgit