Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    Allow iallocator to work without LVM storage · 36a566e8
    Iustin Pop authored
    
    Currently, the iallocator interface requires LVM storage, due to the
    way it computes the node storage information.
    
    By changing the code to understand that GetVGName() can return None,
    and by setting the disk_total/disk_free node parameters to the value
    zero, we can workaround this issue until proper multi-storage
    reporting is implemented.
    
    The hail iallocator plugin works without changes once this is
    implemented, as it already handles non-LVM storage as "foreign"
    storage (with unlimited capacity).
    
    The patch also changes a bit how the parameters are retrieved and
    used; hopefully this is a bit safer and more readable.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    36a566e8