<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi, John<div><br></div><div>Thanks for your reply, I will follow your instructions. </div><div><br></div><div>It will be great if I can help out with any part of the plan, I'm really happy to do it.</div><div><br></div><div>BR,</div><div><br></div><div>Zheng<br><br><div>> Date: Mon, 15 Jun 2015 14:50:41 +0100<br>> From: john@johngarbutt.com<br>> To: openstack-dev@lists.openstack.org<br>> Subject: Re: [openstack-dev] [nova] Adding success message to succeed actions<br>> <br>> On 15 June 2015 at 08:03, Ö£ÕñÓî <zheng.zhenyu@outlook.com> wrote:<br>> > Hi All,<br>> ><br>> > When querying instance actions using API: nova instance-action-list, nova<br>> > will response with a table show in below:<br>> > root@controller:~# nova instance-action-list<br>> > fcbba82f-60a1-4785-84f2-88bcf2da7e7e<br>> > +--------+-------------------------------------------------+---------+----------------------------+<br>> > | Action | Request_ID<br>> > | Message | Start_Time                       |<br>> > +--------+-------------------------------------------------+---------+----------------------------+<br>> > | create | req-78e63d14-5177-4bcf-8d94-7a60af4f276f | -             |<br>> > 2015-06-11T07:36:20.000000 |<br>> > +--------+-------------------------------------------------+---------+----------------------------+<br>> > this instance has been successfully created and we can see that the message<br>> > about this action is empty.<br>> > root@controller:~# nova list<br>> > +--------------------------------------------+--------+--------+------------+-------------+--------------------------+<br>> > | ID                                                              | Name   |<br>> > Status | Task State | Power State | Networks                 |<br>> > +--------------------------------------------+--------+--------+------------+-------------+--------------------------+<br>> > | fcbba82f-60a1-4785-84f2-88bcf2da7e7e | test_1 | ACTIVE | -<br>> > | Running     | sample_network=20.20.0.7 |<br>> > +--------------------------------------------+--------+--------+------------+-------------+--------------------------+<br>> ><br>> > On the other hand, when an action uses nova-scheduler and the action fails<br>> > before or within nova-scheduler, the message of response table will also be<br>> > empty. For example, when an instance failed to be created when there are no<br>> > valid host (an oversized flavor has been chosen), querying instance action<br>> > using nova instance-action-list will show the below table:<br>> ><br>> > root@controller:~# nova instance-action-list<br>> > 101756c5-6d6b-412b-9cc6-1628fa7c0b9c<br>> > +--------+-----------------------------------------------------+---------+----------------------------+<br>> > | Action | Request_ID<br>> > | Message | Start_Time                 |<br>> > +--------+-----------------------------------------------------+---------+----------------------------+<br>> > | create | req-88d93eeb-fad9-4039-8ba6-1d2f01a0605d | -             |<br>> > 2015-06-12T04:03:10.000000 |<br>> > +--------+-----------------------------------------------------+---------+----------------------------+<br>> ><br>> > root@controller:~# nova list<br>> > +-----------------------------------------------+------------+--------+------------+-------------+--------------------------+<br>> > | ID                                                                  | Name<br>> > | Status | Task State | Power State | Networks                 |<br>> > +----------------------------------------------+------------+--------+------------+-------------+--------------------------+<br>> > | 101756c5-6d6b-412b-9cc6-1628fa7c0b9c | event_test | ERROR  | -          |<br>> > NOSTATE     |                          |<br>> > | fcbba82f-60a1-4785-84f2-88bcf2da7e7e | test_1     | ACTIVE | -          |<br>> > Running     | sample_network=20.20.0.7 |<br>> > +----------------------------------------------+------------+--------+------------+-------------+--------------------------+<br>> ><br>> > but other failed action will have an error message:<br>> ><br>> > root@controller:/var/log/nova# nova instance-action-list<br>> > 4525360f-75da-4d5e-bed7-a21e62212eab<br>> > +--------+------------------------------------------+---------+----------------------------+<br>> > | Action | Request_ID                               | Message | Start_Time<br>> > |<br>> > +--------+------------------------------------------+---------+----------------------------+<br>> > | create | req-7be58a31-0243-43a1-8a21-45ad1e90d279 | -       |<br>> > 2015-06-12T07:38:05.000000 |<br>> > | resize | req-120f3379-313c-471e-b6e5-4d8d6a7d1357 | Error   |<br>> > 2015-06-15T06:36:38.000000 |<br>> > +--------+------------------------------------------+---------+----------------------------+<br>> ><br>> > As we can see from the above example, we can not identify such failed<br>> > actions from others only using nova instance-action-list API.<br>> ><br>> > I suggest we adding success messages to succeed actions and/or adding error<br>> > messages to the above mentioned failed actions to fix this problem.<br>> <br>> This is a big known weak point in the Nova API right now.<br>> <br>> My gut tells me we should add an extra status field for<br>> Pending/Success/Failure, rather than making users parse a string<br>> message.<br>> <br>> This general area is being revisited as part of the "tasks" topic that<br>> we mention here:<br>> http://specs.openstack.org/openstack/nova-specs/priorities/liberty-priorities.html#priorities-without-a-clear-plan<br>> <br>> It would be great if you could submit a backlog spec to describe this<br>> issue, so we don't loose that when we draw up the bigger plans:<br>> http://specs.openstack.org/openstack/nova-specs/specs/backlog/index.html<br>> <br>> It would be even better if you are happy to help with Tasks effort.<br>> Although we are not quite yet in a position which people can help out<br>> with that, although I do hope we can get there soon.<br>> <br>> Thanks,<br>> John<br>> <br>> __________________________________________________________________________<br>> OpenStack Development Mailing List (not for usage questions)<br>> Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></div></div>                                        </div></body>
</html>