From c56630c421867df61875a83adfd99ec931896fe7 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Thu, 19 Jan 2012 21:36:42 -0800 Subject: scheduler host_manager needs service for filters distributed scheduler isn't checking service_is_up or services['disabled'] due to filters not having access to service. Fixed both. Since ec2 API also uses service_down_time, I moved service_is_up() into utils and made ec2 use it. Change-Id: I0321844a47031b2de4d8738e032a4634edd1e945 --- nova/api/ec2/cloud.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nova/api') diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 2869b4fe1..eb115d8dc 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -50,7 +50,6 @@ from nova import volume FLAGS = flags.FLAGS flags.DECLARE('dhcp_domain', 'nova.network.manager') -flags.DECLARE('service_down_time', 'nova.scheduler.driver') LOG = logging.getLogger("nova.api.ec2.cloud") @@ -290,8 +289,7 @@ class CloudController(object): hsvcs = [service for service in services \ if service['host'] == host] for svc in hsvcs: - delta = now - (svc['updated_at'] or svc['created_at']) - alive = (delta.seconds <= FLAGS.service_down_time) + alive = utils.service_is_up(svc) art = (alive and ":-)") or "XXX" active = 'enabled' if svc['disabled']: -- cgit