Re: [openstack-dev] [nova][searchlight] status of an instance on the REST API and in the instance notifications

2017-08-07 Thread Balázs Gibizer
> -Original Message-
> From: Matt Riedemann [mailto:mriede...@gmail.com]
> Sent: July 26, 2017 03:23
> To: openstack-dev@lists.openstack.org
> Subject: Re: [openstack-dev] [nova][searchlight] status of an instance on the
> REST API and in the instance notifications
> 
> On 7/19/2017 10:54 AM, Balazs Gibizer wrote:
> > On Wed, Jul 19, 2017 at 5:38 PM, McLellan, Steven
> >  wrote:
> >> Thanks Balazs for noticing and replying to my message!
> >>
> >> The Status field is quite important to us since it's the indicator of
> >> VM state that Horizon displays most prominently and the most simple
> >> description of whether a VM is currently usable or not without having
> >> to parse the various _state fields. If we can't get this change added
> >> in Pike I'll probably implement a simplified version of the mapping in
> >> [2], but it would be really good to get it into the notifications in
> >> Pike if possible. I understand though that this late in the cycle it
> >> may not be possible.
> >
> > I can create a patch to add the status to the instance notifications but
> > I don't know if nova cores accept it for this late in Pike.
> > @Cores: Do you?
> >
> > Cheers,
> > gibi
> 
> It's probably too late to be dealing with this right now in Pike. I'd
> like to defer this to Queens where we can refactor the REST API common
> view code into a better place where it could be re-used with the
> notifications code if this is something we're going to add to the
> versioned notifications, and it's probably easy enough to do that.

I opened a bp for Queens [1].
@Searchlight folks: please check it and come back with feedback and additional 
requirements.

Cheers,
gibi
[1] 
https://blueprints.launchpad.net/nova/+spec/additional-notification-fields-for-searchlight-queens

> 
> --
> 
> Thanks,
> 
> Matt
> 
> __
> 
> 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


Re: [openstack-dev] [nova][searchlight] status of an instance on the REST API and in the instance notifications

2017-07-25 Thread Matt Riedemann

On 7/19/2017 10:54 AM, Balazs Gibizer wrote:
On Wed, Jul 19, 2017 at 5:38 PM, McLellan, Steven 
 wrote:

Thanks Balazs for noticing and replying to my message!

The Status field is quite important to us since it's the indicator of 
VM state that Horizon displays most prominently and the most simple 
description of whether a VM is currently usable or not without having 
to parse the various _state fields. If we can't get this change added 
in Pike I'll probably implement a simplified version of the mapping in 
[2], but it would be really good to get it into the notifications in 
Pike if possible. I understand though that this late in the cycle it 
may not be possible.


I can create a patch to add the status to the instance notifications but 
I don't know if nova cores accept it for this late in Pike.

@Cores: Do you?

Cheers,
gibi


It's probably too late to be dealing with this right now in Pike. I'd 
like to defer this to Queens where we can refactor the REST API common 
view code into a better place where it could be re-used with the 
notifications code if this is something we're going to add to the 
versioned notifications, and it's probably easy enough to do that.


--

Thanks,

Matt

__
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


Re: [openstack-dev] [nova][searchlight] status of an instance on the REST API and in the instance notifications

2017-07-19 Thread Balazs Gibizer



On Wed, Jul 19, 2017 at 5:38 PM, McLellan, Steven 
 wrote:

Thanks Balazs for noticing and replying to my message!

The Status field is quite important to us since it's the indicator of 
VM state that Horizon displays most prominently and the most simple 
description of whether a VM is currently usable or not without having 
to parse the various _state fields. If we can't get this change added 
in Pike I'll probably implement a simplified version of the mapping 
in [2], but it would be really good to get it into the notifications 
in Pike if possible. I understand though that this late in the cycle 
it may not be possible.


I can create a patch to add the status to the instance notifications 
but I don't know if nova cores accept it for this late in Pike.

@Cores: Do you?

Cheers,
gibi




Thanks,

Steve

On 7/19/17, 10:27 AM, "Balazs Gibizer"  
wrote:


Hi,

Steve asked the following question on IRC [1]

< sjmc7> hi gibi. sorry, meant to bring this up in the 
notifications
meeting but i had to step away for a bit. we were having a 
discussion
last week about the field that the API returns as 'status' - do 
the

notifications have an equivalent?

I will try to answer it here so others can chime in.

Internally in nova an instance has vm_state, task_state and
power_state. On the REST API the instance has status which is
calculated from vm_state and task_state. See the code doing the
conversion here [2]. The instance notifications contain both the
vm_state, task_state and power_state of the instance but do not 
contain
the calculated status value [3]. The instance.update notification 
has

extra state fields to signal possible state transitions [4].

Technically we can add the calculated status field to the 
notifications
but it is not there at the moment. So if searchlight needs that 
info
right now then it needs to be calculated on searchlight side 
based on

the vm_state and the task_state from the notification.

Adding this field can be a continuation of the bp
additional-notification-fields-for-searchlight [5] in Queens.


Cheers,
gibi

[1]

http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-07-18.log.html#t2017-07-18T17:39:36

[2]

https://github.com/openstack/nova/blob/a4a9733f4a9ead01356f0f76c1bb1f04f905fa4e/nova/api/openstack/common.py#L113

[3]

https://github.com/openstack/nova/blob/2e4417d57cb6f74664c5746b43db9a96797f33e9/nova/notifications/objects/instance.py#L52-L54

[4]

https://github.com/openstack/nova/blob/2e4417d57cb6f74664c5746b43db9a96797f33e9/nova/notifications/objects/instance.py#L352

[5]

https://blueprints.launchpad.net/nova/+spec/additional-notification-fields-for-searchlight




__

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



__
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


Re: [openstack-dev] [nova][searchlight] status of an instance on the REST API and in the instance notifications

2017-07-19 Thread McLellan, Steven
Thanks Balazs for noticing and replying to my message!

The Status field is quite important to us since it's the indicator of VM state 
that Horizon displays most prominently and the most simple description of 
whether a VM is currently usable or not without having to parse the various 
_state fields. If we can't get this change added in Pike I'll probably 
implement a simplified version of the mapping in [2], but it would be really 
good to get it into the notifications in Pike if possible. I understand though 
that this late in the cycle it may not be possible.

Thanks,

Steve

On 7/19/17, 10:27 AM, "Balazs Gibizer"  wrote:

Hi,

Steve asked the following question on IRC [1]

< sjmc7> hi gibi. sorry, meant to bring this up in the notifications 
meeting but i had to step away for a bit. we were having a discussion 
last week about the field that the API returns as 'status' - do the 
notifications have an equivalent?

I will try to answer it here so others can chime in.

Internally in nova an instance has vm_state, task_state and 
power_state. On the REST API the instance has status which is 
calculated from vm_state and task_state. See the code doing the 
conversion here [2]. The instance notifications contain both the 
vm_state, task_state and power_state of the instance but do not contain 
the calculated status value [3]. The instance.update notification has 
extra state fields to signal possible state transitions [4].

Technically we can add the calculated status field to the notifications 
but it is not there at the moment. So if searchlight needs that info 
right now then it needs to be calculated on searchlight side based on 
the vm_state and the task_state from the notification.

Adding this field can be a continuation of the bp 
additional-notification-fields-for-searchlight [5] in Queens.


Cheers,
gibi

[1] 

http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-07-18.log.html#t2017-07-18T17:39:36
[2] 

https://github.com/openstack/nova/blob/a4a9733f4a9ead01356f0f76c1bb1f04f905fa4e/nova/api/openstack/common.py#L113
[3] 

https://github.com/openstack/nova/blob/2e4417d57cb6f74664c5746b43db9a96797f33e9/nova/notifications/objects/instance.py#L52-L54
[4] 

https://github.com/openstack/nova/blob/2e4417d57cb6f74664c5746b43db9a96797f33e9/nova/notifications/objects/instance.py#L352
[5] 

https://blueprints.launchpad.net/nova/+spec/additional-notification-fields-for-searchlight


__
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