← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1712816] [NEW] reporting incorrect allocations for "DISK_GB" in case of volume-backed instances

 

Public bug reported:

On the stable/pike (commit b37411c1e3d167156b6e54f837fc291c9e61eeef)
"DISK_GB" allocation in case of volume-backed instance is accounting incorrectly
in placement db allocations table.

Steps to reproduce:

1. Create bootable volume

$ cinder create 1 --name bootable_volume --image a1776a29-6a27-4e9b-
a8a9-7c71f6261ce3

2. Boot instance from above created volume

Flavor details:

+----------------------------+---------+
| Property                   | Value   |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled   | False   |
| OS-FLV-EXT-DATA:ephemeral  | 0       |
| disk                       | 1       |
| extra_specs                | {}      |
| id                         | 1       |
| name                       | m1.tiny |
| os-flavor-access:is_public | True    |
| ram                        | 512     |
| rxtx_factor                | 1.0     |
| swap                       |         |
| vcpus                      | 1       |
+----------------------------+---------+

$ nova boot --flavor 1 --boot-volume 57e80a9f-
65f1-44d7-a603-d1d894e81853 boot-from-volume

3. Check the allocations/usages

$ curl -g -i -X GET
http://10.232.48.200/placement/resource_providers/57b44d13-9e1f-4347-ba81-6d95571a5770/usages
-H "Accept: application/json" -H "Content-Type: application/json" -H
"OpenStack-API-Version: placement latest" -H "x-auth-token:
08a621ec51bd4b49be1ea71f916f1f2b"

OUTPUT:

HTTP/1.1 200 OK
Date: Mon, 21 Aug 2017 09:41:59 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 88
Content-Type: application/json
OpenStack-API-Version: placement 1.10
vary: OpenStack-API-Version
x-openstack-request-id: req-fab2e84e-0e20-41de-9a7c-67bac074535e
Connection: close

{"resource_provider_generation": 1, "usages": {"VCPU": 1, "MEMORY_MB":
512, "DISK_GB": 1}}

So the "DISK_GB" usage in step 3 is shown as 1 (that means
flavor.root_gb) but it should be 0 because instance is booted from
volume.

After appliying the patches [1][2] on stable/pike it's reporting the
proper "DISK_GB" usages.

[1]: https://review.openstack.org/#/c/428481/
[2]: https://review.openstack.org/#/c/428505/

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: pike-rc-potential placement

** Tags removed: pla
** Tags added: pike-rc-potential placement

** Description changed:

  On the stable/pike (commit b37411c1e3d167156b6e54f837fc291c9e61eeef)
  "DISK_GB" allocation in case of volume-backed instance is accounting incorrectly
  in placement db allocations table.
  
  Steps to reproduce:
  
  1. Create bootable volume
  
  $ cinder create 1 --name bootable_volume --image a1776a29-6a27-4e9b-
  a8a9-7c71f6261ce3
  
  2. Boot instance from above created volume
  
  Flavor details:
  
  +----------------------------+---------+
  | Property                   | Value   |
  +----------------------------+---------+
  | OS-FLV-DISABLED:disabled   | False   |
  | OS-FLV-EXT-DATA:ephemeral  | 0       |
  | disk                       | 1       |
  | extra_specs                | {}      |
  | id                         | 1       |
  | name                       | m1.tiny |
  | os-flavor-access:is_public | True    |
  | ram                        | 512     |
  | rxtx_factor                | 1.0     |
  | swap                       |         |
  | vcpus                      | 1       |
  +----------------------------+---------+
  
- 
- $ nova boot --flavor 1 --boot-volume 57e80a9f-65f1-44d7-a603-d1d894e81853 boot-from-volume
+ $ nova boot --flavor 1 --boot-volume 57e80a9f-
+ 65f1-44d7-a603-d1d894e81853 boot-from-volume
  
  3. Check the allocations/usages
  
  $ curl -g -i -X GET
  http://10.232.48.200/placement/resource_providers/57b44d13-9e1f-4347-ba81-6d95571a5770/usages
  -H "Accept: application/json" -H "Content-Type: application/json" -H
  "OpenStack-API-Version: placement latest" -H "x-auth-token:
  08a621ec51bd4b49be1ea71f916f1f2b"
- 
  
  OUTPUT:
  
  HTTP/1.1 200 OK
  Date: Mon, 21 Aug 2017 09:41:59 GMT
  Server: Apache/2.4.18 (Ubuntu)
  Content-Length: 88
  Content-Type: application/json
  OpenStack-API-Version: placement 1.10
  vary: OpenStack-API-Version
  x-openstack-request-id: req-fab2e84e-0e20-41de-9a7c-67bac074535e
  Connection: close
  
  {"resource_provider_generation": 1, "usages": {"VCPU": 1, "MEMORY_MB":
  512, "DISK_GB": 1}}
  
- 
- So the "DISK_GB" usage in step 3 is shown as 1 (that means flavor.root_gb) but it should be 0 because instance is booted from volume.
+ So the "DISK_GB" usage in step 3 is shown as 1 (that means
+ flavor.root_gb) but it should be 0 because instance is booted from
+ volume.
  
  After appliying the patches [1][2] on stable/pike it's reporting the
  proper "DISK_GB" usages.
  
  [1]: https://review.openstack.org/#/c/428481/
  [2]: https://review.openstack.org/#/c/428505/

-- 
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/1712816

Title:
  reporting incorrect allocations for "DISK_GB"  in case of volume-
  backed instances

Status in OpenStack Compute (nova):
  New

Bug description:
  On the stable/pike (commit b37411c1e3d167156b6e54f837fc291c9e61eeef)
  "DISK_GB" allocation in case of volume-backed instance is accounting incorrectly
  in placement db allocations table.

  Steps to reproduce:

  1. Create bootable volume

  $ cinder create 1 --name bootable_volume --image a1776a29-6a27-4e9b-
  a8a9-7c71f6261ce3

  2. Boot instance from above created volume

  Flavor details:

  +----------------------------+---------+
  | Property                   | Value   |
  +----------------------------+---------+
  | OS-FLV-DISABLED:disabled   | False   |
  | OS-FLV-EXT-DATA:ephemeral  | 0       |
  | disk                       | 1       |
  | extra_specs                | {}      |
  | id                         | 1       |
  | name                       | m1.tiny |
  | os-flavor-access:is_public | True    |
  | ram                        | 512     |
  | rxtx_factor                | 1.0     |
  | swap                       |         |
  | vcpus                      | 1       |
  +----------------------------+---------+

  $ nova boot --flavor 1 --boot-volume 57e80a9f-
  65f1-44d7-a603-d1d894e81853 boot-from-volume

  3. Check the allocations/usages

  $ curl -g -i -X GET
  http://10.232.48.200/placement/resource_providers/57b44d13-9e1f-4347-ba81-6d95571a5770/usages
  -H "Accept: application/json" -H "Content-Type: application/json" -H
  "OpenStack-API-Version: placement latest" -H "x-auth-token:
  08a621ec51bd4b49be1ea71f916f1f2b"

  OUTPUT:

  HTTP/1.1 200 OK
  Date: Mon, 21 Aug 2017 09:41:59 GMT
  Server: Apache/2.4.18 (Ubuntu)
  Content-Length: 88
  Content-Type: application/json
  OpenStack-API-Version: placement 1.10
  vary: OpenStack-API-Version
  x-openstack-request-id: req-fab2e84e-0e20-41de-9a7c-67bac074535e
  Connection: close

  {"resource_provider_generation": 1, "usages": {"VCPU": 1, "MEMORY_MB":
  512, "DISK_GB": 1}}

  So the "DISK_GB" usage in step 3 is shown as 1 (that means
  flavor.root_gb) but it should be 0 because instance is booted from
  volume.

  After appliying the patches [1][2] on stable/pike it's reporting the
  proper "DISK_GB" usages.

  [1]: https://review.openstack.org/#/c/428481/
  [2]: https://review.openstack.org/#/c/428505/

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1712816/+subscriptions