yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60811
[Bug 1659266] [NEW] Disk allocation for instance is not good with swap
Public bug reported:
When creating the allocation for the instance, we lookup the flavor to
know the disk sizes for root, ephemeral and gb and we basically sum
them.
https://github.com/openstack/nova/blob/7d04c78c1e2c26125eff5b1a8543b1ac5d027107/nova/scheduler/client/report.py#L129-L131
Unfortunately, since both root and ephemeral size are expressed in GB
while swap is expressed in MB, the sum is not good.
See how the DiskFilter works for accounting resources :
https://github.com/openstack/nova/blob/3cafa7f5bd0775b8ba49080226c03f8a91468d7d/nova/scheduler/filters/disk_filter.py#L36-L38
We should change the logic to ceil to the next GB if modulo(root +
ephemeral * 1024 + swap / 1024) is not rounded to 0 since we want to
count allocations as the Inventory only counts by GB.
That's suboptimal and a long-term solution would be to report
inventories in bytes (as the smallest attribute) but that's a big change
so probably requiring a BP.
** Affects: nova
Importance: High
Status: Confirmed
** Tags: compute low-hanging-fruit placement resource-tracker
** Description changed:
When creating the allocation for the instance, we lookup the flavor to
know the disk sizes for root, ephemeral and gb and we basically sum
them.
https://github.com/openstack/nova/blob/7d04c78c1e2c26125eff5b1a8543b1ac5d027107/nova/scheduler/client/report.py#L129-L131
Unfortunately, since both root and ephemeral size are expressed in GB
while swap is expressed in MB, the sum is not good.
See how the DiskFilter works for accounting resources :
https://github.com/openstack/nova/blob/3cafa7f5bd0775b8ba49080226c03f8a91468d7d/nova/scheduler/filters/disk_filter.py#L36-L38
We should change the logic to ceil to the next GB if modulo(root +
ephemeral * 1024 + swap / 1024) is not rounded to 0 since we want to
count allocations as the Inventory only counts by GB.
That's suboptimal and a long-term solution would be to report
- inventories in MB but that's a big change so probably requiring a BP.
+ inventories in bytes (as the smallest attribute) but that's a big change
+ so probably requiring a BP.
--
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/1659266
Title:
Disk allocation for instance is not good with swap
Status in OpenStack Compute (nova):
Confirmed
Bug description:
When creating the allocation for the instance, we lookup the flavor to
know the disk sizes for root, ephemeral and gb and we basically sum
them.
https://github.com/openstack/nova/blob/7d04c78c1e2c26125eff5b1a8543b1ac5d027107/nova/scheduler/client/report.py#L129-L131
Unfortunately, since both root and ephemeral size are expressed in GB
while swap is expressed in MB, the sum is not good.
See how the DiskFilter works for accounting resources :
https://github.com/openstack/nova/blob/3cafa7f5bd0775b8ba49080226c03f8a91468d7d/nova/scheduler/filters/disk_filter.py#L36-L38
We should change the logic to ceil to the next GB if modulo(root +
ephemeral * 1024 + swap / 1024) is not rounded to 0 since we want to
count allocations as the Inventory only counts by GB.
That's suboptimal and a long-term solution would be to report
inventories in bytes (as the smallest attribute) but that's a big
change so probably requiring a BP.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1659266/+subscriptions
Follow ups