libvirt: Shared Resource Provider (RP) DISK_GB is NOT taken into account if it's configured with Compute Node RPs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Bhagyashri Shewale |
Bug Description
If user configures shared resource provider for disk_gb resources and links it with the compute nodes resource provider using aggregates then the disk_gb resources are still allocated from compute Node resource provider instead of shared resource provider.
Environment Details:
commit id: 0051e622e90ef4e
1. Compute Host A
2. NFS server on Host B
3. Disk files stored in the instance path on each compute nodes is mounted on NFS server storage.
Steps to reproduce:
1. Create shared resource provider
$ curl -g -i -X POST http://<HOST IP>/placement/
2. Create inventory DISK_GB against shared resource provider created step 1.
$ curl -g -i -X POST http://<HOST IP>/placement/
3. Create an aggregate
$ nova aggregate-create shared_
4. link both the compute node RP and shared resource provider to agrregate create in step 3
$ curl -g -i -X PUT http://<HOST IP>/placement/
5. Add MISC_SHARES_
$ curl -g -i -X PUT http://<HOST IP>/placement/
6. Boot the instance:
Flavor Details:
$ nova boot --flavor 1 --image <image_id> <instance_name>
7. Check usages of compute node resource provider:
$ curl -g -i -X GET http://<HOST IP>/placement/
HTTP/1.1 200 OK
Date: Wed, 28 Mar 2018 06:22:59 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 90
Content-Type: application/json
Cache-Control: no-cache
Last-Modified: Wed, 28 Mar 2018 06:22:59 GMT
openstack-
vary: openstack-
x-openstack-
Connection: close
{"resource_
8. Check usages of shared resource provider:
$ curl -g -i -X GET http:// <HOST IP>/placement/
HTTP/1.1 200 OK
Date: Wed, 28 Mar 2018 06:23:05 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 61
Content-Type: application/json
Cache-Control: no-cache
Last-Modified: Wed, 28 Mar 2018 06:23:05 GMT
openstack-
vary: openstack-
x-openstack-
Connection: close
{"resource_
Observation:
By comparing usages details above (point 7 and 8) it shows that DISK_GB is consumed from Compute Node Resource Provider and not from the Shared Resource Provider.
Expected Result: DISK_GB should be allocated from the shared resource provider.
Changed in nova: | |
assignee: | nobody → Bhagyashri Shewale (bhagyashri-shewale) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
assignee: | Bhagyashri Shewale (bhagyashri-shewale) → Eric Fried (efried) |
Changed in nova: | |
assignee: | Eric Fried (efried) → Bhagyashri Shewale (bhagyashri-shewale) |
Changed in nova: | |
assignee: | Bhagyashri Shewale (bhagyashri-shewale) → Eric Fried (efried) |
Changed in nova: | |
assignee: | Eric Fried (efried) → Bhagyashri Shewale (bhagyashri-shewale) |
Changed in nova: | |
assignee: | Bhagyashri Shewale (bhagyashri-shewale) → Jay Pipes (jaypipes) |
Changed in nova: | |
assignee: | Jay Pipes (jaypipes) → Bhagyashri Shewale (bhagyashri-shewale) |
Changed in nova: | |
assignee: | Bhagyashri Shewale (bhagyashri-shewale) → Balazs Gibizer (balazs-gibizer) |
Changed in nova: | |
assignee: | Balazs Gibizer (balazs-gibizer) → Bhagyashri Shewale (bhagyashri-shewale) |
Unless I'm badly mistaken, the root cause of this bug is that the compute node resource provider continues to have inventory of DISK_GB, even when a sharing provider of DISK_GB is associated with it. The solution to this problem should be that the virt driver should notice that there is a sharing provider of DISK_GB and remove the DISK_GB inventory on the compute node resource provider.