• Iustin Pop's avatar
    Fix growing of DRBD disks · 6d33a6eb
    Iustin Pop authored
    Patch 03941a26
     made disk growth VG-aware, but the code has a bug: it
    only works for LD_LV disks, and not LD_DRBD. To fix it, we add a
    generic function to compute the per-VG growth requirements, and switch
    to using that instead of manual build.
    Furthermore, since the function _CheckNodesFreeDiskPerVG always takes
    its input from this new function or _ComputeDiskSizePerVG, we change
    the latter to always return a dict (possibly empty), instead of either
    a dict or None. This makes the types more consistent.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>