From 8c4605c3c7261d10e3fa21496ee7de8a42f4fc1a Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Fri, 1 Dec 2017 17:16:42 +0800 Subject: [PATCH] Fix status message inside validate_can_perform_action() If we assign status with just self.db_info.task_status, we would get a exception message like : ERROR: Instance d6f3861d-21d2-4e96-9df1-64cf6439ea9c is not currently available for an action to be performed (task status was (84 ERROR Build error: guestagent timeout.)). (HTTP 422) But here we actually need action only. Change-Id: Iab69ba01937aa8e7a9be9e95e499d64891beed03 Signed-off-by: Fan Zhang --- trove/instance/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trove/instance/models.py b/trove/instance/models.py index d9ce037024..de89bd5688 100644 --- a/trove/instance/models.py +++ b/trove/instance/models.py @@ -1261,7 +1261,7 @@ class Instance(BuiltInstance): elif (self.db_info.task_status != InstanceTasks.NONE and self.db_info.task_status != InstanceTasks.RESTART_REQUIRED): status_type = 'task' - status = self.db_info.task_status + status = self.db_info.task_status.action elif not self.datastore_status.status.action_is_allowed: status = self.status elif Backup.running(self.id):