[nova][dev][ops] server status when compute host is down

melanie witt melwittt at gmail.com
Thu May 23 17:01:59 UTC 2019


+ at openstack-discuss, ML was accidentally dropped from Mohammed's reply

On Thu, 23 May 2019 20:45:13 +0800, Mohammed Naser <mnaser at vexxhost.com> 
wrote:
> 
> 
> On Thu, May 23, 2019, 10:00 AM melanie witt <melwittt at gmail.com 
> <mailto:melwittt at gmail.com>> wrote:
> 
>     Hey all,
> 
>     I'm looking for feedback around whether we can improve how we show
>     server status in server list and server show when the compute host it
>     resides on is down.
> 
>     When a compute host goes down while a server on it was previously
>     running, the server status continues to show as ACTIVE in a server
>     list.
>     This is because the power state and status is adjusted by a periodic
>     task run by nova-compute, so if nova-compute is down, it cannot update
>     those states.
> 
>     So, for an end user, when they do a server list, they see their server
>     as ACTIVE when it's actually powered off.
> 
>     We have another field called 'host_status' available since API
>     microversion 2.16 [1] which is controlled by policy and defaults to
>     admin, which is capable of showing the server status as UNKNOWN if the
>     field is specified, for example:
> 
>     nova list --fields
>     id,name,status,task_state,power_state,networks,host_status
> 
>     This is cool, but it is only available to admin by default, and it
>     requires that the end user adds the field to their CLI command in the
>     --fields option.
> 
>     Question: do people think we should make the server status field
>     reflect
>     UNKNOWN as well, if the 'host_status' is UNKNOWN? And if so, should it
>     be controlled by policy or no?
> 
> 
> I'm in support of this. I also agree on the fact it should be controlled 
> by policy however not to get too ahead of my self:
> 
> - I think it should ideally be defaulted to true
> - ideally this should be an API level policy and not compute level
> 
>     Normally, we do not expose compute host details to non-admin in the API
>     by default, but I noticed recently that our "down cells" support will
>     show server status as UNKNOWN if a server is in a down cell [2]. So I
>     wondered if it would be considered OK to show UNKNOWN if a host is down
>     we well, without defaulting it to admin-only.
> 
>     I would really appreciate if people could share their opinion here and
>     if consensus is in support, I will move forward with proposing a change
>     accordingly.
> 
>     Cheers,
>     -melanie
> 
> 
> Thank you for proposing this
> 
>     [1]
>     https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id14
>     [2]
>     https://github.com/openstack/nova/blob/66a77f2fb75bbb9daebdca1cad0255ecafe41e92/nova/api/openstack/compute/views/servers.py#L108
> 







More information about the openstack-discuss mailing list