yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72944
[Bug 1771728] [NEW] libvirt: Shared Resource Provider (RP) DISK_GB is NOT taken into account if it's configured with Compute Node RPs
Public bug reported:
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: 0051e622e90ef4ea2678f3a1135043da460cad19
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/resource_providers -H
"Content-Type: application/json" -H "X-Auth-Token: <auth-token value>"
-H "OpenStack-API-Version: placement latest" -d '{"name": "shared-disk",
"uuid": <UUID of ----->'
2. Create inventory DISK_GB against shared resource provider created
step 1.
$ curl -g -i -X POST http://<HOST IP>/placement/resource_providers/<RP
ID>/inventories -H "Content-Type: application/json" -H "X-Auth-Token:
<auth-token value>" " -d '{"resource_class": "DISK_GB", "total": 78,
"reserved": 0, "min_unit": 1, "max_unit": 78, "step_size": 1,
"allocation_ratio": 1.0}'
3. Create an aggregate
$ nova aggregate-create shared_resource_aggregate
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/resource_providers/<RP
ID>/aggregates -H "Accept: application/json" -H "Content-Type:
application/json" -H "OpenStack-API-Version: placement latest" -H "x
-auth-token: <auth-token value>" " -d '{"aggregates": [ "<aggregate ID>"
], "resource_provider_generation": 1}'
5. Add MISC_SHARES_VIA_AGGREGATE trait to shared resource provider
$ curl -g -i -X PUT http://<HOST IP>/placement/resource_providers/<RP
ID>/traits -H "Accept: application/json" -H "Content-Type:
application/json" -H "OpenStack-API-Version: placement latest" -H "x
-auth-token: <auth-token value>" " -d '{"traits":
["MISC_SHARES_VIA_AGGREGATE"], "resource_provider_generation": 1}'
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/resource_providers/<RP ID>/usages -H "Accept: application/json" -H "Content-Type: application/json" -H "OpenStack-API-Version: placement latest" -H "x-auth-token: 27903d0f-cc28-45ae-ae2e-3105c9e640b9"
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-api-version: placement 1.21
vary: openstack-api-version
x-openstack-request-id: req-b3fe929f-187f-47d6-92a6-03c605a39848
Connection: close
{"resource_provider_generation": 5, "usages": {"VCPU": 1, "MEMORY_MB":
512, "DISK_GB": 1}}
8. Check usages of shared resource provider:
$ curl -g -i -X GET http:// <HOST IP>/placement/resource_providers/<RP ID>/usages -H "Accept: application/json" -H "Content-Type: application/json" -H "OpenStack-API-Version: placement latest" -H "x-auth-token: 27903d0f-cc28-45ae-ae2e-3105c9e640b9"
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-api-version: placement 1.21
vary: openstack-api-version
x-openstack-request-id: req-8093854e-c5ab-429a-8dbc-474ef06ed243
Connection: close
{"resource_provider_generation": 3, "usages": {"DISK_GB": 0}}
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.
** Affects: nova
Importance: Undecided
Assignee: Bhagyashri Shewale (bhagyashri-shewale)
Status: New
** Changed in: nova
Assignee: (unassigned) => Bhagyashri Shewale (bhagyashri-shewale)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1771728
Title:
libvirt: Shared Resource Provider (RP) DISK_GB is NOT taken into
account if it's configured with Compute Node RPs
Status in OpenStack Compute (nova):
New
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: 0051e622e90ef4ea2678f3a1135043da460cad19
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/resource_providers -H
"Content-Type: application/json" -H "X-Auth-Token: <auth-token value>"
-H "OpenStack-API-Version: placement latest" -d '{"name": "shared-
disk", "uuid": <UUID of ----->'
2. Create inventory DISK_GB against shared resource provider created
step 1.
$ curl -g -i -X POST http://<HOST IP>/placement/resource_providers/<RP
ID>/inventories -H "Content-Type: application/json" -H "X-Auth-Token:
<auth-token value>" " -d '{"resource_class": "DISK_GB", "total": 78,
"reserved": 0, "min_unit": 1, "max_unit": 78, "step_size": 1,
"allocation_ratio": 1.0}'
3. Create an aggregate
$ nova aggregate-create shared_resource_aggregate
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/resource_providers/<RP
ID>/aggregates -H "Accept: application/json" -H "Content-Type:
application/json" -H "OpenStack-API-Version: placement latest" -H "x
-auth-token: <auth-token value>" " -d '{"aggregates": [ "<aggregate
ID>" ], "resource_provider_generation": 1}'
5. Add MISC_SHARES_VIA_AGGREGATE trait to shared resource provider
$ curl -g -i -X PUT http://<HOST IP>/placement/resource_providers/<RP
ID>/traits -H "Accept: application/json" -H "Content-Type:
application/json" -H "OpenStack-API-Version: placement latest" -H "x
-auth-token: <auth-token value>" " -d '{"traits":
["MISC_SHARES_VIA_AGGREGATE"], "resource_provider_generation": 1}'
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/resource_providers/<RP ID>/usages -H "Accept: application/json" -H "Content-Type: application/json" -H "OpenStack-API-Version: placement latest" -H "x-auth-token: 27903d0f-cc28-45ae-ae2e-3105c9e640b9"
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-api-version: placement 1.21
vary: openstack-api-version
x-openstack-request-id: req-b3fe929f-187f-47d6-92a6-03c605a39848
Connection: close
{"resource_provider_generation": 5, "usages": {"VCPU": 1, "MEMORY_MB":
512, "DISK_GB": 1}}
8. Check usages of shared resource provider:
$ curl -g -i -X GET http:// <HOST IP>/placement/resource_providers/<RP ID>/usages -H "Accept: application/json" -H "Content-Type: application/json" -H "OpenStack-API-Version: placement latest" -H "x-auth-token: 27903d0f-cc28-45ae-ae2e-3105c9e640b9"
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-api-version: placement 1.21
vary: openstack-api-version
x-openstack-request-id: req-8093854e-c5ab-429a-8dbc-474ef06ed243
Connection: close
{"resource_provider_generation": 3, "usages": {"DISK_GB": 0}}
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1771728/+subscriptions
Follow ups