[openstack-dev] [nova] Adding success message to succeed actions

郑振宇 zheng.zhenyu at outlook.com
Mon Jun 15 07:03:08 UTC 2015


Hi All,
When querying instance actions using API: nova instance-action-list, nova will response with a table show in below:root at controller:~# nova instance-action-list fcbba82f-60a1-4785-84f2-88bcf2da7e7e+--------+-------------------------------------------------+---------+----------------------------+| Action | Request_ID                                                       | Message | Start_Time                       |+--------+-------------------------------------------------+---------+----------------------------+| create | req-78e63d14-5177-4bcf-8d94-7a60af4f276f | -             | 2015-06-11T07:36:20.000000 |+--------+-------------------------------------------------+---------+----------------------------+this instance has been successfully created and we can see that the message about this action is empty.root at controller:~# nova list+--------------------------------------------+--------+--------+------------+-------------+--------------------------+| ID                                                              | Name   | Status | Task State | Power State | Networks                 |+--------------------------------------------+--------+--------+------------+-------------+--------------------------+| fcbba82f-60a1-4785-84f2-88bcf2da7e7e | test_1 | ACTIVE | -                  | Running     | sample_network=20.20.0.7 |+--------------------------------------------+--------+--------+------------+-------------+--------------------------+
On the other hand, when an action uses nova-scheduler and the action fails before or within nova-scheduler, the message of response table will also be empty. For example, when an instance failed to be created when there are no valid host (an oversized flavor has been chosen), querying instance action using nova instance-action-list will show the below table:
root at controller:~# nova instance-action-list 101756c5-6d6b-412b-9cc6-1628fa7c0b9c+--------+-----------------------------------------------------+---------+----------------------------+| Action | Request_ID                                                             | Message | Start_Time                 |+--------+-----------------------------------------------------+---------+----------------------------+| create | req-88d93eeb-fad9-4039-8ba6-1d2f01a0605d | -             | 2015-06-12T04:03:10.000000 |+--------+-----------------------------------------------------+---------+----------------------------+
root at controller:~# nova list+-----------------------------------------------+------------+--------+------------+-------------+--------------------------+| ID                                                                  | Name       | Status | Task State | Power State | Networks                 |+----------------------------------------------+------------+--------+------------+-------------+--------------------------+| 101756c5-6d6b-412b-9cc6-1628fa7c0b9c | event_test | ERROR  | -          | NOSTATE     |                          || fcbba82f-60a1-4785-84f2-88bcf2da7e7e | test_1     | ACTIVE | -          | Running     | sample_network=20.20.0.7 |+----------------------------------------------+------------+--------+------------+-------------+--------------------------+
but other failed action will have an error message:
root at controller:/var/log/nova# nova instance-action-list 4525360f-75da-4d5e-bed7-a21e62212eab+--------+------------------------------------------+---------+----------------------------+| Action | Request_ID                               | Message | Start_Time                 |+--------+------------------------------------------+---------+----------------------------+| create | req-7be58a31-0243-43a1-8a21-45ad1e90d279 | -       | 2015-06-12T07:38:05.000000 || resize | req-120f3379-313c-471e-b6e5-4d8d6a7d1357 | Error   | 2015-06-15T06:36:38.000000 |+--------+------------------------------------------+---------+----------------------------+
As we can see from the above example, we can not identify such failed actions from others only using nova instance-action-list API.
I suggest we adding success messages to succeed actions and/or adding error messages to the above mentioned failed actions to fix this problem.
Thanks,BR,Zheng 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150615/e87b0d78/attachment.html>


More information about the OpenStack-dev mailing list