From ad74424768463cd6ad02dd9d6fdf64fc7b3bbafb Mon Sep 17 00:00:00 2001 From: David Subiros Date: Fri, 5 Aug 2011 16:35:56 +0100 Subject: Improve the liveness checking for services With this modification both nova-manage and scheduler use the flag service_down_time and check positive and negative values in a correct way. Fixes bug: 867674. Change-Id: I15c48d80cafa2089cd228c09c61b0a1e513730e8 --- bin/nova-manage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index acaf05216..244c11869 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -1021,7 +1021,7 @@ class ServiceCommands(object): _('Updated_At')) for svc in services: delta = now - (svc['updated_at'] or svc['created_at']) - alive = (delta.seconds <= 15) + alive = abs(utils.total_seconds(delta)) <= FLAGS.service_down_time art = (alive and ":-)") or "XXX" active = 'enabled' if svc['disabled']: -- cgit