hypervisor status does not update immediately after 'nova delete'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Medium
|
Marian Horban |
Bug Description
Hypervisor status does not update immediately after 'nova delete', after about 1min the status is correct. But if we boot instance or live migrate on this hyperviosr, it make mistake.
Also, I notice that when running command 'nova boot --image cirros-
Actually, after 'nova delete' the table compute_nodes will not be updated immediately, it also lasts until periodic task.
BUT, those should be updated immediately.
Test steps:
1. environment, there is a 'vm1' on hypervisor 'ubuntu'
zhgaoxa@
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| a439e64e-
+------
zhgaoxa@
+------
| Property | Value |
+------
| status | ACTIVE |
| updated | 2013-07-
| OS-EXT-
| OS-EXT-
| key_name | None |
| image | cirros-
| private network | 10.0.0.2 |
| hostId | 3ed8295691f7c64
| OS-EXT-STS:vm_state | active |
| OS-EXT-
| OS-SRV-
| OS-EXT-
| flavor | m1.tiny (1) |
| id | a439e64e-
| security_groups | [{u'name': u'default'}] |
| OS-SRV-
| user_id | 2361015c303149f
| name | vm1 |
| created | 2013-07-
| tenant_id | cc05fb78cffb4c3
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| os-extended-
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-
| OS-EXT-
| config_drive | |
+------
2. delete vm1 and watch the hypervior status. The value of property free_ram_
zhgaoxa@
zhgaoxa@
Every 2.0s: nova hypervisor-show ubuntu Thu Jul 18 15:09:18 2013
+------
| Property | Value |
+------
| hypervisor_hostname | ubuntu |
| cpu_info | {"vendor": "Intel", "model": "Conroe", "arch": "x86_64", "features": ["rdtscp", "ht", "vme"], "topology": {"cores": 2, "threads": 1, "sockets": 1}} |
| free_disk_gb | 29 |
| hypervisor_version | 1000000 |
| disk_available_
| local_gb | 30 |
| free_ram_mb | 979 |
| id | 1 |
| vcpus_used | 1 |
| hypervisor_type | QEMU |
| local_gb_used | 1 |
| memory_mb_used | 1024 |
| memory_mb | 2003 |
| current_workload | 0 |
| vcpus | 2 |
| running_vms | 1 |
| service_id | 2 |
| service_host | ubuntu |
+------
4. mysql> select * from compute_nodes;
mysql> select * from compute_nodes;
+------
| created_at | updated_at | deleted_at | id | service_id | vcpus | memory_mb | local_gb | vcpus_used | memory_mb_used | local_gb_used | hypervisor_type | hypervisor_version | cpu_info | disk_available_
+------
| 2013-07-17 05:55:55 | 2013-07-18 05:37:13 | NULL | 1 | 2 | 2 | 2003 | 30 | 0 | 512 | 0 | QEMU | 1000000 | {"vendor": "Intel", "model": "Conroe", "arch": "x86_64", "features": ["rdtscp", "ht", "vme"], "topology": {"cores": 2, "threads": 1, "sockets": 1}} | 25 | 1491 | 30 | 0 | 0 | ubuntu | 0 |
+------
1 row in set (0.00 sec)
tags: |
added: compute libvirtt removed: hypervisor status |
tags: |
added: libvirt removed: libvirtt |
Changed in nova: | |
assignee: | nobody → Andres Buraschi (andres-buraschi) |
Changed in nova: | |
assignee: | Andres Buraschi (andres-buraschi) → nobody |
Changed in nova: | |
assignee: | nobody → Marian Horban (mhorban) |
This will show how boot instance error: ubuntu: ~/src$ for i in {1..10};do nova boot --image cirros- 0.3.1-x86_ 64-uec --flavor 1 vm$i;done ubuntu: ~/src$ nova list ------- ------- ------- ------- ----+-- ----+-- ------+ ------- -----+- ------- -----+- ------- ------- ---+ ------- ------- ------- ------- ----+-- ----+-- ------+ ------- -----+- ------- -----+- ------- ------- ---+ 8ad1-43be- b63f-30d99048e5 a5 | vm1 | ACTIVE | None | Running | private=10.0.0.2 | 193a-4761- 92a5-3389e6fcb7 c0 | vm10 | ERROR | None | NOSTATE | | fbcb-4997- bb67-b19524747b 2b | vm2 | ACTIVE | None | Running | private=10.0.0.3 | 956a-4813- 8075-acdf3296f4 e3 | vm3 | ACTIVE | None | Running | private=10.0.0.4 | 7f6c-4f6a- 907f-430b405624 69 | vm4 | ACTIVE | None | Running | private=10.0.0.5 | 44a2-45ea- 9d03-4c07da27e8 ff | vm5 | ACTIVE | None | Running | private=10.0.0.6 | 7eae-48dc- 946d-32969c8866 99 | vm6 | ERROR | None | NOSTATE | | 77af-46f3- bc66-ca20e5bec1 78 | vm7 | ERROR | None | NOSTATE | | 4268-476d- bed0-e0fa26ee70 f4 | vm8 | ERROR | None | NOSTATE | | 1d82-49e6- ad14-1e1a6c4795 16 | vm9 | ERROR | None | NOSTATE | | ------- ------- ------- ------- ----+-- ----+-- ------+ ------- -----+- ------- -----+- ------- ------- ---+ ubuntu: ~/src$ nova hypervisor-show ubuntu ------- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -----+ ------- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -----+ least | 20 |
1. zhgaoxa@
2. zhgaoxa@
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 19e24952-
| 5c4a0391-
| 99afccff-
| 80a352e8-
| 07aa47da-
| 5c72622f-
| b491b24c-
| 51f01870-
| 2bc26be6-
| 692f9d20-
+------
3. zhgaoxa@
+------
| Property | Value |
+------
| hypervisor_hostname | ubuntu |
| cpu_info | {"vendor": "Intel", "model": "Conroe", "arch": "x86_64", "features": ["rdtscp", "ht", "vme"], "topology": {"cores": 2, "threads": 1, "sockets": 1}} |
| free_disk_gb | 25 |
| hypervisor_version | 1000000 |
| disk_available_
| local_gb | 30 ...