• Iustin Pop's avatar
    RPC call_node_info: change protocol · cb6a0296
    Iustin Pop authored
    Currently, the call_node_info RPC does always check both the VG free
    space and the hypervisor information. However, in ⅔ of the uses, we only
    care about one or the other. Therefore, we change it so that if any of
    the passed parameters is None, we don't perform the respective check. We
    also modify its callers to only pass in what they need.
    This also helps if the "default" hypervisor is broken and we want to
    create an instance for another hypervisor.
    With this patch, the duration of this rpc changes from 500ms to 90ms for
    a normal LVM+Xen PVM node, when we only require the LVM data; when we
    only require the hypervisor data, it doesn't change (as the “xm list”
    time is dominant).
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
cmdlib.py 387 KB