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

Balazs Gibizer balazs.gibizer at ericsson.com
Wed Jul 19 15:27:59 UTC 2017


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.



More information about the OpenStack-dev mailing list