After evacuate origin host still report a runing vm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
jiang, yunhong |
Bug Description
After evacuate a host with one instance to a target host it still report there is an instance in that hypervisor
Pre evacuate report:
$ nova hypervisor-stats
+------
| Property | Value |
+------
| count | 2 |
| current_workload | 0 |
| disk_available_
| free_disk_gb | 50 |
| free_ram_mb | 3860 |
| local_gb | 50 |
| local_gb_used | 0 |
| memory_mb | 4948 |
| memory_mb_used | 1088 |
| running_vms | 1 |
| vcpus | 3 |
| vcpus_used | 1 |
+------
$ nova hypervisor-list
+----+-
| ID | Hypervisor hostname |
+----+-
| 1 | jmolle-Controller |
| 2 | jmolle-Node1 |
+----+-
$ nova hypervisor-show jmolle-Controller
+------
| Property | Value |
+------
| cpu_info_arch | x86_64 |
| cpu_info_features | ["rdtscp", "hypervisor", "x2apic", "ss", "ds", "vme"] |
| cpu_info_model | Westmere |
| cpu_info_
| cpu_info_
| cpu_info_
| cpu_info_vendor | Intel |
| current_workload | 0 |
| disk_available_
| free_disk_gb | 25 |
| free_ram_mb | 3378 |
| host_ip | 192.168.41.101 |
| hypervisor_hostname | jmolle-Controller |
| hypervisor_type | QEMU |
| hypervisor_version | 1000000 |
| id | 1 |
| local_gb | 25 |
| local_gb_used | 0 |
| memory_mb | 3954 |
| memory_mb_used | 576 |
| running_vms | 1 |
| service_host | jmolle-Controller |
| service_id | 4 |
| vcpus | 2 |
| vcpus_used | 1 |
+------
$ nova hypervisor-servers jmolle-Controller
+------
| ID | Name | Hypervisor ID | Hypervisor Hostname |
+------
| a3c291e5-
+------
But after evacuate the instanse we get:
$ nova hypervisor-stats
+------
| Property | Value |
+------
| count | 2 |
| current_workload | 1 |
| disk_available_
| free_disk_gb | 50 |
| free_ram_mb | 3796 |
| local_gb | 50 |
| local_gb_used | 0 |
| memory_mb | 4948 |
| memory_mb_used | 1152 |
| running_vms | 2 |
| vcpus | 3 |
| vcpus_used | 2 |
+------
here we see that now there are 2 running instances instead of one
and if we use show command we get:
$ nova hypervisor-show jmolle-Controller
+------
| Property | Value |
+------
| cpu_info_arch | x86_64 |
| cpu_info_features | ["rdtscp", "hypervisor", "x2apic", "ss", "ds", "vme"] |
| cpu_info_model | Westmere |
| cpu_info_
| cpu_info_
| cpu_info_
| cpu_info_vendor | Intel |
| current_workload | 0 |
| disk_available_
| free_disk_gb | 25 |
| free_ram_mb | 3378 |
| host_ip | 192.168.41.101 |
| hypervisor_hostname | jmolle-Controller |
| hypervisor_type | QEMU |
| hypervisor_version | 1000000 |
| id | 1 |
| local_gb | 25 |
| local_gb_used | 0 |
| memory_mb | 3954 |
| memory_mb_used | 576 |
| running_vms | 1 |
| service_host | jmolle-Controller |
| service_id | 4 |
| vcpus | 2 |
| vcpus_used | 1 |
+------
we also see 1 running instance
but if we list servers we get 0
$ nova hypervisor-servers jmolle-Controller
+----+-
| ID | Name | Hypervisor ID | Hypervisor Hostname |
+----+-
+----+-
and the instance was evacuate to the other host correctly
$ nova hypervisor-servers jmolle-Node1
+------
| ID | Name | Hypervisor ID | Hypervisor Hostname |
+------
| a3c291e5-
+------
I think this is a nova bug due to the inconcistency of hypervisor-show and hypervisor-servers nova commands
Changed in nova: | |
assignee: | nobody → jiang, yunhong (yunhong-jiang) |
tags: | added: api compute |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-2 → 2014.2 |
Additional info.
after evacuate the database query
select hypervisor_ hostname, running_ vms from compute_nodes;
report
+------ ------- ------- -+----- ------- -+ ------- ------- -+----- ------- -+ ------- ------- -+----- ------- -+
| hypervisor_hostname | running_vms |
+------
| jmolle-Controller | 1 |
| jmolle-Node1 | 1 |
+------
but as soon as the compute node goes up, it update the database reportin running_vm = 0
should the evacuate command if it is succesful update the compute node to report that no instance is running?