Skip to content
Snippets Groups Projects
Commit cb6a0296 authored by Iustin Pop's avatar Iustin Pop
Browse files

RPC call_node_info: change protocol


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>
parent 84ce674e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment