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

郑振宇 zheng.zhenyu at outlook.com
Tue Jun 16 01:19:33 UTC 2015


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: john at johngarbutt.com
> To: openstack-dev at lists.openstack.org
> Subject: Re: [openstack-dev] [nova] Adding success message to succeed actions
> 
> On 15 June 2015 at 08:03, 郑振宇 <zheng.zhenyu at 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 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.
> 
> 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-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150616/d21394fe/attachment.html>


More information about the OpenStack-dev mailing list