Confusing error message while creating replica instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
Low
|
Fan Zhang |
Bug Description
First, I have a ERROR instance which its actual task_id is 82, which means (BUILDING, 'Build error: Volume.')
[root@node-15 root]# trove list
+------
| Name | Datastore | Datastore Version | Status |
-------
| f-test | redis | 3.2 | ERROR |
-------
Then I create a replica instance of it, the error message shows below:
ERROR: Instance e7224fa5-
Is the status EEROR or BUILD? It is confusing. I think the error message should be more specific that could show instance status or task status based on current codes.
Changed in trove: | |
assignee: | nobody → Fan Zhang (fanzhang) |
description: | updated |
Changed in trove: | |
status: | New → In Progress |
Changed in trove: | |
importance: | Undecided → Low |
when create replica of the f-test instance, it will call validae_ can_perform_ action method. And the the method first check the server_status. In this case, server_status is "BUILD"(set by method load_simple_ instance_ server_ status) . ####### ####### ####### ####### ####### ####### ###### instance_ server_ status( context, db_info): task_status. action:
db_info. server_ status = "BUILD"
db_info. addresses = {} ####### ####### ####### ####### ####### ####### #####
#######
def load_simple_
"""Loads a server or raises an exception."""
if 'BUILDING' == db_info.
#######
The status in the error message is task status, not instance status. Instance status is an integrated status, compare with task status, it does little help for code developer to locate bug.
So, in my opinion, instance status is showed for common user. For developer, raise task status(or service status or servr status)is more friendly.