Bug 1302586 - CapacityFilter in capacity_filter.py does not calculate correctly a free space [NEEDINFO]
Summary: CapacityFilter in capacity_filter.py does not calculate correctly a free space
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 6.0 (Juno)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 6.0 (Juno)
Assignee: Gorka Eguileor
QA Contact: nlevinki
URL:
Whiteboard:
: 1302584 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-28 08:34 UTC by Shinobu KINJO
Modified: 2019-10-10 11:01 UTC (History)
6 users (show)

Fixed In Version: openstack-cinder-2014.2.4-4.el7ost
Doc Type: Enhancement
Doc Text:
With this update, the scheduler now calculates reserved space against total space instead of against the remaining free space. This is achieved by multiplying reserved_percentage by total_space. This update synchronizes the method for calculating reserved space in Red Hat Enterprise Linux OpenStack Platform 6 with that of Red Hat Enterprise Linux OpenStack Platform 7 and above.
Clone Of:
Environment:
Last Closed: 2016-03-10 17:06:44 UTC
Target Upstream Version:
skinjo: needinfo? (sgotliv)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0436 0 normal SHIPPED_LIVE openstack-cinder bug fix advisory 2016-03-10 22:05:37 UTC

Description Shinobu KINJO 2016-01-28 08:34:12 UTC
Description of problem:

In order to calculate free space correctly, free needs to be based on free_space value.
Is it possible to backport CapacityFilter class in [2] to Juno based OSP?


  [1] openstack-cinder-2014.2.4-2.el7ost.noarch
   29 class CapacityFilter(filters.BaseHostFilter):
   30     """CapacityFilter filters based on volume host's capacity utilization."""
   31 
   32     def host_passes(self, host_state, filter_properties):
     ...
   55         reserved = float(host_state.reserved_percentage) / 100
   56         free = math.floor(free_space * (1 - reserved))


  [2] openstack-cinder-2015.1.2-5.el7ost.noarch
   31 class CapacityFilter(filters.BaseHostFilter):
   32     """CapacityFilter filters based on volume host's capacity utilization."""
   33 
   34     def host_passes(self, host_state, filter_properties):
     ...
   50         free_space = host_state.free_capacity_gb
   51         total_space = host_state.total_capacity_gb
   52         reserved = float(host_state.reserved_percentage) / 100
     ...
   78         free = free_space - math.floor(total * reserved)

Rgds,
Shinobu

Version-Release number of selected component (if applicable):

  [1] openstack-cinder-2014.2.4-2.el7ost.noarch.rpm

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info:

Comment 2 Sergey Gotliv 2016-01-28 11:13:28 UTC
*** Bug 1302584 has been marked as a duplicate of this bug. ***

Comment 5 Gorka Eguileor 2016-02-05 17:51:32 UTC
We will be synchronizing the free space calculation in OSP6 with OSP7 and later, so that reserved_percentage is used against total space instead of remaining free space.

Comment 14 nlevinki 2016-03-03 09:09:33 UTC
As written in commet#12 customer will test it on his env.
fix is in
openstack-cinder-2014.2.4-6.el7ost.noarch

Comment 19 errata-xmlrpc 2016-03-10 17:06:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0436.html


Note You need to log in before you can comment on or make changes to this bug.