On Mon, Feb 22, 2016 at 04:23:00PM +0100, Klaus Aehlig wrote: > > 2. Don't we want decrementing mem_free and incrementing i_p_up_mem to have > > the > > same check, ie be in the same if block? > > Good point, I missed that other conditional. So I propose the following > interdiff. > > commit 64feb4b09e2e9d4aa8dbdd4fda8400d43e99ae54 > Author: Klaus Aehlig <[email protected]> > Date: Mon Feb 22 16:17:21 2016 +0100 > > INTERDIFF > > diff --git a/lib/masterd/iallocator.py b/lib/masterd/iallocator.py > index 252f50c..631acff 100644 > --- a/lib/masterd/iallocator.py > +++ b/lib/masterd/iallocator.py > @@ -712,8 +712,6 @@ class IAllocator(object): > if iinfo.admin_state == constants.ADMINST_UP \ > and not iinfo.forthcoming: > mem_free -= max(0, i_mem_diff) > - > - if iinfo.admin_state == constants.ADMINST_UP: > i_p_up_mem += beinfo[constants.BE_MAXMEM] > return (i_p_mem, i_p_up_mem, mem_free)
LGTM
