Hi, John Thanks for your reply, I will follow your instructions. It will be great if I can help out with any part of the plan, I'm really happy to do it. BR, Zheng
> Date: Mon, 15 Jun 2015 14:50:41 +0100 > From: j...@johngarbutt.com > To: openstack-dev@lists.openstack.org > Subject: Re: [openstack-dev] [nova] Adding success message to succeed actions > > On 15 June 2015 at 08:03, 郑振宇 <zheng.zhe...@outlook.com> wrote: > > Hi All, > > > > When querying instance actions using API: nova instance-action-list, nova > > will response with a table show in below: > > root@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@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@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@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@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. > > This is a big known weak point in the Nova API right now. > > My gut tells me we should add an extra status field for > Pending/Success/Failure, rather than making users parse a string > message. > > This general area is being revisited as part of the "tasks" topic that > we mention here: > http://specs.openstack.org/openstack/nova-specs/priorities/liberty-priorities.html#priorities-without-a-clear-plan > > It would be great if you could submit a backlog spec to describe this > issue, so we don't loose that when we draw up the bigger plans: > http://specs.openstack.org/openstack/nova-specs/specs/backlog/index.html > > It would be even better if you are happy to help with Tasks effort. > Although we are not quite yet in a position which people can help out > with that, although I do hope we can get there soon. > > Thanks, > John > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev