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

McLellan, Steven steve.mclellan at hpe.com
Wed Jul 19 15:38:35 UTC 2017

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.



On 7/19/17, 10:27 AM, "Balazs Gibizer" <balazs.gibizer at ericsson.com> wrote:

    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.
    OpenStack Development Mailing List (not for usage questions)
    Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe

More information about the OpenStack-dev mailing list