ED_OBJECT_DICT_LIST,
ED_INST_DICT,
ED_INST_DICT_HVP_BEP_DP,
- ED_NODE_TO_DISK_DICT,
+ ED_NODE_TO_DISK_DICT_DP,
ED_INST_DICT_OSP_DP,
ED_IMPEXP_IO,
ED_FILE_DETAILS,
ED_COMPRESS,
ED_BLOCKDEV_RENAME,
ED_DISKS_DICT_DP,
+ ED_MULTI_DISKS_DICT_DP,
ED_SINGLE_DISK_DICT_DP,
- ED_NIC_DICT) = range(1, 15)
+ ED_NIC_DICT) = range(1, 16)
def _Prepare(calls):
def _NodeInfoPreProc(node, args):
- """Prepare the exclusive_storage argument for node_info calls."""
- assert len(args) == 3
- # The third argument is either a dictionary with one value for each node, or
- # a fixed value to be used for all the nodes
- if type(args[2]) is dict:
- return [args[0], args[1], args[2][node]]
+ """Prepare the storage_units argument for node_info calls."""
+ assert len(args) == 2
+ # The storage_units argument is either a dictionary with one value for each
+ # node, or a fixed value to be used for all the nodes
+ if type(args[0]) is dict:
+ return [args[0][node], args[1]]
else:
return args
("instance_info", SINGLE, None, constants.RPC_TMO_URGENT, [
("instance", None, "Instance name"),
("hname", None, "Hypervisor type"),
+ ("hvparams", None, "Hypervisor parameters"),
], None, None, "Returns information about a single instance"),
("all_instances_info", MULTI, None, constants.RPC_TMO_URGENT, [
("hypervisor_list", None, "Hypervisors to query for instances"),
+ ("all_hvparams", None, "Dictionary mapping hypervisor names to hvparams"),
], None, None,
"Returns information about all instances on the given nodes"),
("instance_list", MULTI, None, constants.RPC_TMO_URGENT, [
("success", None, "Whether the migration was a success or failure"),
], None, None, "Finalize any target-node migration specific operation"),
("instance_migrate", SINGLE, None, constants.RPC_TMO_SLOW, [
+ ("cluster_name", None, "Cluster name"),
("instance", ED_INST_DICT, "Instance object"),
("target", None, "Target node name"),
("live", None, "Whether the migration should be done live or not"),
], None, None,
"Gets the sizes of requested block devices present on a node"),
("blockdev_create", SINGLE, None, constants.RPC_TMO_NORMAL, [
- ("bdev", ED_OBJECT_DICT, None),
+ ("bdev", ED_SINGLE_DISK_DICT_DP, None),
("size", None, None),
("owner", None, None),
("on_primary", None, None),
], None, None,
"Request wipe at given offset with given size of a block device"),
("blockdev_remove", SINGLE, None, constants.RPC_TMO_NORMAL, [
- ("bdev", ED_OBJECT_DICT, None),
+ ("bdev", ED_SINGLE_DISK_DICT_DP, None),
], None, None, "Request removal of a given block device"),
("blockdev_pause_resume_sync", SINGLE, None, constants.RPC_TMO_NORMAL, [
("disks", ED_DISKS_DICT_DP, None),
], None, None, "Request shutdown of a given block device"),
("blockdev_addchildren", SINGLE, None, constants.RPC_TMO_NORMAL, [
("bdev", ED_SINGLE_DISK_DICT_DP, None),
- ("ndevs", ED_OBJECT_DICT_LIST, None),
+ ("ndevs", ED_DISKS_DICT_DP, None),
], None, None,
"Request adding a list of children to a (mirroring) device"),
("blockdev_removechildren", SINGLE, None, constants.RPC_TMO_NORMAL, [
- ("bdev", ED_OBJECT_DICT, None),
- ("ndevs", ED_OBJECT_DICT_LIST, None),
+ ("bdev", ED_SINGLE_DISK_DICT_DP, None),
+ ("ndevs", ED_DISKS_DICT_DP, None),
], None, None,
"Request removing a list of children from a (mirroring) device"),
("blockdev_close", SINGLE, None, constants.RPC_TMO_NORMAL, [
("instance_name", None, None),
- ("disks", ED_OBJECT_DICT_LIST, None),
+ ("disks", ED_DISKS_DICT_DP, None),
], None, None, "Closes the given block devices"),
("blockdev_getdimensions", SINGLE, None, constants.RPC_TMO_NORMAL, [
- ("disks", ED_OBJECT_DICT_LIST, None),
+ ("disks", ED_MULTI_DISKS_DICT_DP, None),
], None, None, "Returns size and spindles of the given disks"),
("drbd_disconnect_net", MULTI, None, constants.RPC_TMO_NORMAL, [
- ("nodes_ip", None, None),
- ("disks", ED_OBJECT_DICT_LIST, None),
- ], None, None, "Disconnects the network of the given drbd devices"),
+ ("disks", ED_DISKS_DICT_DP, None),
+ ], None, None,
+ "Disconnects the network of the given drbd devices"),
("drbd_attach_net", MULTI, None, constants.RPC_TMO_NORMAL, [
- ("nodes_ip", None, None),
("disks", ED_DISKS_DICT_DP, None),
("instance_name", None, None),
("multimaster", None, None),
], None, None, "Connects the given DRBD devices"),
("drbd_wait_sync", MULTI, None, constants.RPC_TMO_SLOW, [
- ("nodes_ip", None, None),
("disks", ED_DISKS_DICT_DP, None),
], None, None,
"Waits for the synchronization of drbd devices is complete"),
+ ("drbd_needs_activation", SINGLE, None, constants.RPC_TMO_NORMAL, [
+ ("disks", ED_MULTI_DISKS_DICT_DP, None),
+ ], None, None,
+ "Returns the drbd disks which need activation"),
("blockdev_grow", SINGLE, None, constants.RPC_TMO_NORMAL, [
("cf_bdev", ED_SINGLE_DISK_DICT_DP, None),
("amount", None, None),
("dryrun", None, None),
("backingstore", None, None),
+ ("es_flag", None, None),
], None, None, "Request growing of the given block device by a"
" given amount"),
("blockdev_export", SINGLE, None, constants.RPC_TMO_1DAY, [
("devlist", ED_BLOCKDEV_RENAME, None),
], None, None, "Request rename of the given block devices"),
("blockdev_find", SINGLE, None, constants.RPC_TMO_NORMAL, [
- ("disk", ED_OBJECT_DICT, None),
+ ("disk", ED_SINGLE_DISK_DICT_DP, None),
], None, _BlockdevFindPostProc,
"Request identification of a given block device"),
("blockdev_getmirrorstatus", SINGLE, None, constants.RPC_TMO_NORMAL, [
], None, _BlockdevGetMirrorStatusPostProc,
"Request status of a (mirroring) device"),
("blockdev_getmirrorstatus_multi", MULTI, None, constants.RPC_TMO_NORMAL, [
- ("node_disks", ED_NODE_TO_DISK_DICT, None),
+ ("node_disks", ED_NODE_TO_DISK_DICT_DP, None),
], _BlockdevGetMirrorStatusMultiPreProc,
_BlockdevGetMirrorStatusMultiPostProc,
"Request status of (mirroring) devices from multiple nodes"),
("blockdev_setinfo", SINGLE, None, constants.RPC_TMO_NORMAL, [
- ("disk", ED_OBJECT_DICT, None),
+ ("disk", ED_SINGLE_DISK_DICT_DP, None),
("info", None, None),
], None, None, "Sets metadata information on a given block device"),
]
], None, None, "Checks if a node has the given IP address"),
("node_info", MULTI, None, constants.RPC_TMO_URGENT, [
("storage_units", None,
- "List of tuples '<storage_type>,<key>' to ask for disk space"
- " information"),
- ("hv_names", None,
- "Names of the hypervisors to ask for node information"),
- ("exclusive_storage", None,
- "Whether exclusive storage is enabled"),
+ "List of tuples '<storage_type>,<key>,[<param>]' to ask for disk space"
+ " information; the parameter list varies depending on the storage_type"),
+ ("hv_specs", None,
+ "List of hypervisor specification (name, hvparams) to ask for node "
+ "information"),
], _NodeInfoPreProc, None, "Return node information"),
("node_verify", MULTI, None, constants.RPC_TMO_NORMAL, [
("checkdict", None, "What to verify"),
"Demote a node from the master candidate role"),
("node_powercycle", SINGLE, ACCEPT_OFFLINE_NODE, constants.RPC_TMO_NORMAL, [
("hypervisor", None, "Hypervisor type"),
+ ("hvparams", None, "Hypervisor parameters"),
], None, None, "Tries to powercycle a node"),
+ ("node_configure_ovs", SINGLE, None, constants.RPC_TMO_NORMAL, [
+ ("ovs_name", None, "Name of the OpenvSwitch to create"),
+ ("ovs_link", None, "Link of the OpenvSwitch to the outside"),
+ ], None, None, "This will create and setup the OpenvSwitch"),
]
_MISC_CALLS = [