• Helga Velroyen's avatar
    iallocator: use lookup by disk template · e8936ef7
    Helga Velroyen authored
    So far, the iallocator requested storage information
    about all enabled disk templates but discarded all but
    the LVM information, even if it was allocating space
    for a non-LVM instance. With this patch, it now only
    asks for the one that is relevant for
    the allocation request.
    This has the following advantages:
    - less load in the RPC call
    - meaningful storage information is used for non-LVM
      instance and thus better allocation
    Note that this so far works only for instance allocation.
    The code introduces some FIXMEs which will be resolved
    when utilizing the improvements in other iallocator
    requests as well.
    Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
iallocator.py 27.5 KB