summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2012-01-19 21:36:42 -0800
committerChris Behrens <cbehrens@codestud.com>2012-01-19 22:02:25 -0800
commitc56630c421867df61875a83adfd99ec931896fe7 (patch)
tree0d3524153216e86ba5e90ef53e5751d0c161534a /nova/api
parent64341eedf993c0738dcd42fb41fd193c184f3464 (diff)
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
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py4
1 files changed, 1 insertions, 3 deletions
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']: