diff options
author | Nguyen Van Trung <trungnvfet@outlook.com> | 2019-08-12 09:51:29 +0700 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2019-09-04 05:48:17 +0000 |
commit | 6c50dec163ce094c4cb27afaef0ada2cb50bbb07 (patch) | |
tree | cc2b0f8d36c94291a82f1291a60d0439575f2997 | |
parent | 1b159c7d6a40f194e34c2083fb840c620382567e (diff) | |
download | trove-6c50dec163ce094c4cb27afaef0ada2cb50bbb07.tar.gz |
Add periodic logs during database mechanism
This patch will help operator and developer who can
follow actions during checking server status and
service status of creating/deleting mechanism.
Change-Id: I479628d66a9016750a21d9846358406e097525e5
-rwxr-xr-x | trove/taskmanager/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/trove/taskmanager/models.py b/trove/taskmanager/models.py index 2a47ed76..3c2ddf6e 100755 --- a/trove/taskmanager/models.py +++ b/trove/taskmanager/models.py @@ -746,6 +746,8 @@ class FreshInstanceTasks(FreshInstance, NotifyMixin, ConfigurationMixin): """ service = InstanceServiceStatus.find_by(instance_id=self.id) status = service.get_status() + LOG.debug("Service status of instance %(instance)s is %(status)s", + {"instance": self.id, "status": status}) if (status == rd_instance.ServiceStatuses.RUNNING or status == rd_instance.ServiceStatuses.INSTANCE_READY): return True @@ -758,6 +760,7 @@ class FreshInstanceTasks(FreshInstance, NotifyMixin, ConfigurationMixin): c_id = self.db_info.compute_instance_id server = self.nova_client.servers.get(c_id) server_status = server.status + LOG.debug("Server status of instance %s is %s", self.id, server_status) if server_status in [InstanceStatus.ERROR, InstanceStatus.FAILED]: server_fault_message = 'No fault found' |