VM status keeps ACTIVE after its nova-compute host is powered off

Asked by Kimi Zhang on 2013-08-06

I am doing a test like this:

I launch a VM running on a nova-compute host, then I power off this nova-compute host, but after that, from nova-api, the VM status is always ACTIVE.

So it seems there's no way for end user to know the VM is actually DOWN via api since the status of the VM in DB is always ACTIVE, there's no mechanism to retrieve VM status actively and periodically ???

Question information

English Edit question
OpenStack Compute (nova) Edit question
No assignee Edit question
Solved by:
Kimi Zhang
Last query:
Last reply:
Tiantian Gao (gtt116) said : #1

Hi Kimi,

Actually, Nova will check the VMs' status in the host every 60 minutes. But the precondition is nova-compute in the host is running.

Because you power off the host, so no process will check the VM in this hosts. In my option, you should setup another service like (nagios, zabbix) to monitor the hosts' status.

Hoping help you.

Kimi Zhang (kimi-zhangkai) said : #2

Hi, Tiantian

Yes, external monitor is one way. But maybe nova server should be able to know the we lost the host, and do something with VM status, not just showing they are ACTIVE.

Tiantian Gao (gtt116) said : #3

In this case, I'm agree with you.

Nova has ability to monitor the nova-compute's status. You can have a try: nova service-list
the response will like:
| Binary | Host | Zone | Status | State | Updated_at |
| nova-conductor | tt-devstack | internal | enabled | up | 2013-08-07T06:30:16.000000 |
| nova-compute | tt-devstack | az2,az | enabled | down | 2013-07-29T10:31:12.000000 |
| nova-cert | tt-devstack | internal | enabled | up | 2013-08-07T06:30:18.000000 |
| nova-network | tt-devstack | internal | enabled | up | 2013-08-07T06:30:10.000000 |
| nova-scheduler | tt-devstack | internal | enabled | up | 2013-08-07T06:30:16.000000 |
| nova-consoleauth | tt-devstack | internal | enabled | up | 2013-08-07T06:30:13.000000 |

But if Nova can set the VM's status in the dead host to some thing like 'ERROR' will be good.
Maybe you can post the idea to mailist for more discuss :)

Kimi Zhang (kimi-zhangkai) said : #4

Yes, agrees.

I'll post to mailing list.

Nicholas Qu (nicholas-qu) said : #5

Has this issue been fixed and in which openstack version?


Kimi Zhang (kimi-zhangkai) said : #6

No fix yet, at the moment.

Nicholas Qu (nicholas-qu) said : #7

thanks for your answer.