Nova does not track shared ceph pools across multiple nodes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
Environment:
- tested in focal-victoria and bionic-stein
=======
Steps to reproduce:
1) Deploy OpenStack having 2 nova-compute nodes
2) Configure both compute nodes to have a RBD backend pointing to the same pool in ceph as below:
[libvirt]
images_type = rbd
images_rbd_pool = nova
3) run "openstack hypervisor show" on each node. Both will show the full pool capacity:
local_gb | 29
local_gb_used | 0
free_disk_gb | 29
disk_available_
4) create a 20gb instance and run "openstack hypervisor show" again on the node it landed:
local_gb | 29
local_gb_used | 20
free_disk_gb | 9
disk_available_
5) create another 20GB one. It will land on the other hypervisor
6) try to create a third 20GB one, it will fail because placement will not return an allocation candidate. This is correct.
7) Now ssh to both the instances and fill their disk (actually based on disk_available_
8) I/O for all instances will be frozen as the ceph pool runs out of space, and the nova-compute service freezes on "create_image" whenever a new instance is attempted to be created there, causing it to be reported as "down".
9) disk_available_
This is the first problem as both compute nodes have their tracking disconnected from the ceph pool on "free_disk_gb" and "local_gb_used", while "disk_available
Alternatively (as a possible solution/
10) openstack resource provider create ceph_nova_pool
11) openstack resource provider inventory set --os-placement-
12) openstack resource provider trait set --os-placement-
13) openstack resource provider aggregate set <ceph_nova_
14) Deleted all instances and repeated steps 4, 5 and 6 but same result
15) openstack resource provider set --name <resource_
16) openstack resource provider set --name <resource_
17) Deleted all instances and repeated steps 4, 5 and 6. Now I was able to create 3 instances, where 1 of them had allocations from the ceph_nova_pool resource provider. The created resource_provider is being treated as an "extra" resource provider.
18) Deleted 2 instances that had allocations from the compute nodes
19) openstack resource provider inventory delete <resource_
20) openstack resource provider inventory delete <resource_
21) watch openstack allocation candidate list --resource DISK_GB=20 --os-placement-
Now, the list would be empty, until nova-compute periodically updates the inventory with its local_gb value and we go back to the state at step 17.
=======
Expected result:
- For the first approach, it is expected that scheduling would be affected by the disk_available_
- For the second approach, it is expected that there is a way to prevent nova-compute when periodically updating a specific inventory, or guarantee that its inventory is shared with another resource_provider instead of an "extra" one.
[0] https:/
[1] https:/
tags: | added: sts |
This is a well-known issue. Closing as a duplicate.