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

Matthew Booth mbooth at redhat.com
Thu May 23 10:11:19 UTC 2019

On Thu, 23 May 2019 at 03:02, melanie witt <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?
> 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.

+1 from me. This seems to have confused users in the past and honest
is better than potentially wrong, imho. I can't think of a reason why
this information 'leak' would cause any problems. Can anybody else?


> 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
> [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

Matthew Booth
Red Hat OpenStack Engineer, Compute DFG

Phone: +442070094448 (UK)

More information about the openstack-discuss mailing list