summaryrefslogtreecommitdiff
path: root/nova/servicegroup
diff options
context:
space:
mode:
authorChangBo Guo(gcb) <eric.guo@easystack.cn>2016-03-24 20:33:50 +0800
committerStephen Finucane <sfinucan@redhat.com>2016-12-08 09:51:03 +0000
commit594b1b1520458b18fa0e488515c50bf4607959b7 (patch)
treea3f35b26dbc49c347899eb584a92c00109188ba0 /nova/servicegroup
parent14a9462504dc9cd352f521158b32d8ce403dd13a (diff)
downloadnova-594b1b1520458b18fa0e488515c50bf4607959b7.tar.gz
Don't use 'updated_at' to check service's status
Commit b9bae02af2168ad64d3b3d28c97c3853cee73272 introduced 'last_seen_up' to check service in Liberty. Nova use 'updated_at' to check that before Liberty. So we can remove legacy item now. Note: 'last_seen_up' may be null at the beginning. so we still need 'created_at' in this case. Change-Id: I5a273c294341027fba66a54a540182fc890522db
Diffstat (limited to 'nova/servicegroup')
-rw-r--r--nova/servicegroup/drivers/db.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py
index ff41ad0c4f..63d94f461e 100644
--- a/nova/servicegroup/drivers/db.py
+++ b/nova/servicegroup/drivers/db.py
@@ -57,10 +57,8 @@ class DbDriver(base.Driver):
"""Moved from nova.utils
Check whether a service is up based on last heartbeat.
"""
- # Keep checking 'updated_at' if 'last_seen_up' isn't set.
- # Should be able to use only 'last_seen_up' in the M release
last_heartbeat = (service_ref.get('last_seen_up') or
- service_ref['updated_at'] or service_ref['created_at'])
+ service_ref['created_at'])
if isinstance(last_heartbeat, six.string_types):
# NOTE(russellb) If this service_ref came in over rpc via
# conductor, then the timestamp will be a string and needs to be