root / lib / rpc_defs.py @ 26d502d0
History | View | Annotate | Download (18.9 kB)
1 |
#
|
---|---|
2 |
#
|
3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
|
5 |
#
|
6 |
# This program is free software; you can redistribute it and/or modify
|
7 |
# it under the terms of the GNU General Public License as published by
|
8 |
# the Free Software Foundation; either version 2 of the License, or
|
9 |
# (at your option) any later version.
|
10 |
#
|
11 |
# This program is distributed in the hope that it will be useful, but
|
12 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 |
# General Public License for more details.
|
15 |
#
|
16 |
# You should have received a copy of the GNU General Public License
|
17 |
# along with this program; if not, write to the Free Software
|
18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
19 |
# 02110-1301, USA.
|
20 |
|
21 |
"""RPC definitions for communication between master and node daemons.
|
22 |
|
23 |
RPC definition fields:
|
24 |
|
25 |
- Name as string
|
26 |
- L{SINGLE} for single-node calls, L{MULTI} for multi-node
|
27 |
- Timeout (e.g. L{TMO_NORMAL})
|
28 |
- List of arguments as tuples
|
29 |
|
30 |
- Name as string
|
31 |
- Argument kind used for encoding/decoding
|
32 |
- Description for docstring (can be C{None})
|
33 |
|
34 |
- Return value wrapper (e.g. for deserializing into L{objects}-based objects)
|
35 |
- Short call description for docstring
|
36 |
|
37 |
"""
|
38 |
|
39 |
from ganeti import utils |
40 |
from ganeti import objects |
41 |
|
42 |
|
43 |
# Guidelines for choosing timeouts:
|
44 |
# - call used during watcher: timeout of 1min, _TMO_URGENT
|
45 |
# - trivial (but be sure it is trivial) (e.g. reading a file): 5min, _TMO_FAST
|
46 |
# - other calls: 15 min, _TMO_NORMAL
|
47 |
# - special calls (instance add, etc.): either _TMO_SLOW (1h) or huge timeouts
|
48 |
TMO_URGENT = 60 # one minute |
49 |
TMO_FAST = 5 * 60 # five minutes |
50 |
TMO_NORMAL = 15 * 60 # 15 minutes |
51 |
TMO_SLOW = 3600 # one hour |
52 |
TMO_4HRS = 4 * 3600 |
53 |
TMO_1DAY = 86400
|
54 |
|
55 |
SINGLE = "single-node"
|
56 |
MULTI = "multi-node"
|
57 |
|
58 |
# Constants for encoding/decoding
|
59 |
(ED_OBJECT_DICT, |
60 |
ED_OBJECT_DICT_LIST, |
61 |
ED_INST_DICT, |
62 |
ED_INST_DICT_HVP_BEP, |
63 |
ED_NODE_TO_DISK_DICT, |
64 |
ED_INST_DICT_OSP, |
65 |
ED_IMPEXP_IO, |
66 |
ED_FILE_DETAILS, |
67 |
ED_FINALIZE_EXPORT_DISKS, |
68 |
ED_COMPRESS, |
69 |
ED_BLOCKDEV_RENAME) = range(1, 12) |
70 |
|
71 |
|
72 |
def _Prepare(calls): |
73 |
"""Converts list of calls to dictionary.
|
74 |
|
75 |
"""
|
76 |
return utils.SequenceToDict(calls)
|
77 |
|
78 |
|
79 |
def _MigrationStatusPostProc(result): |
80 |
"""Post-processor for L{rpc.RpcRunner.call_instance_get_migration_status}.
|
81 |
|
82 |
"""
|
83 |
if not result.fail_msg and result.payload is not None: |
84 |
result.payload = objects.MigrationStatus.FromDict(result.payload) |
85 |
return result
|
86 |
|
87 |
|
88 |
def _BlockdevFindPostProc(result): |
89 |
"""Post-processor for L{rpc.RpcRunner.call_blockdev_find}.
|
90 |
|
91 |
"""
|
92 |
if not result.fail_msg and result.payload is not None: |
93 |
result.payload = objects.BlockDevStatus.FromDict(result.payload) |
94 |
return result
|
95 |
|
96 |
|
97 |
def _BlockdevGetMirrorStatusPostProc(result): |
98 |
"""Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus}.
|
99 |
|
100 |
"""
|
101 |
if not result.fail_msg: |
102 |
result.payload = map(objects.BlockDevStatus.FromDict, result.payload)
|
103 |
return result
|
104 |
|
105 |
|
106 |
def _BlockdevGetMirrorStatusMultiPostProc(result): |
107 |
"""Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus_multi}.
|
108 |
|
109 |
"""
|
110 |
for nres in result.values(): |
111 |
if nres.fail_msg:
|
112 |
continue
|
113 |
|
114 |
for idx, (success, status) in enumerate(nres.payload): |
115 |
if success:
|
116 |
nres.payload[idx] = (success, objects.BlockDevStatus.FromDict(status)) |
117 |
|
118 |
return result
|
119 |
|
120 |
|
121 |
def _OsGetPostProc(result): |
122 |
"""Post-processor for L{rpc.RpcRunner.call_os_get}.
|
123 |
|
124 |
"""
|
125 |
if not result.fail_msg and isinstance(result.payload, dict): |
126 |
result.payload = objects.OS.FromDict(result.payload) |
127 |
return result
|
128 |
|
129 |
|
130 |
def _ImpExpStatusPostProc(result): |
131 |
"""Post-processor for import/export status.
|
132 |
|
133 |
@rtype: Payload containing list of L{objects.ImportExportStatus} instances
|
134 |
@return: Returns a list of the state of each named import/export or None if
|
135 |
a status couldn't be retrieved
|
136 |
|
137 |
"""
|
138 |
if not result.fail_msg: |
139 |
decoded = [] |
140 |
|
141 |
for i in result.payload: |
142 |
if i is None: |
143 |
decoded.append(None)
|
144 |
continue
|
145 |
decoded.append(objects.ImportExportStatus.FromDict(i)) |
146 |
|
147 |
result.payload = decoded |
148 |
|
149 |
return result
|
150 |
|
151 |
|
152 |
_FILE_STORAGE_CALLS = [ |
153 |
("file_storage_dir_create", SINGLE, TMO_FAST, [
|
154 |
("file_storage_dir", None, "File storage directory"), |
155 |
], None, "Create the given file storage directory"), |
156 |
("file_storage_dir_remove", SINGLE, TMO_FAST, [
|
157 |
("file_storage_dir", None, "File storage directory"), |
158 |
], None, "Remove the given file storage directory"), |
159 |
("file_storage_dir_rename", SINGLE, TMO_FAST, [
|
160 |
("old_file_storage_dir", None, "Old name"), |
161 |
("new_file_storage_dir", None, "New name"), |
162 |
], None, "Rename file storage directory"), |
163 |
] |
164 |
|
165 |
_STORAGE_CALLS = [ |
166 |
("storage_list", MULTI, TMO_NORMAL, [
|
167 |
("su_name", None, None), |
168 |
("su_args", None, None), |
169 |
("name", None, None), |
170 |
("fields", None, None), |
171 |
], None, "Get list of storage units"), |
172 |
("storage_modify", SINGLE, TMO_NORMAL, [
|
173 |
("su_name", None, None), |
174 |
("su_args", None, None), |
175 |
("name", None, None), |
176 |
("changes", None, None), |
177 |
], None, "Modify a storage unit"), |
178 |
("storage_execute", SINGLE, TMO_NORMAL, [
|
179 |
("su_name", None, None), |
180 |
("su_args", None, None), |
181 |
("name", None, None), |
182 |
("op", None, None), |
183 |
], None, "Executes an operation on a storage unit"), |
184 |
] |
185 |
|
186 |
_INSTANCE_CALLS = [ |
187 |
("instance_info", SINGLE, TMO_URGENT, [
|
188 |
("instance", None, "Instance name"), |
189 |
("hname", None, "Hypervisor type"), |
190 |
], None, "Returns information about a single instance"), |
191 |
("all_instances_info", MULTI, TMO_URGENT, [
|
192 |
("hypervisor_list", None, "Hypervisors to query for instances"), |
193 |
], None, "Returns information about all instances on the given nodes"), |
194 |
("instance_list", MULTI, TMO_URGENT, [
|
195 |
("hypervisor_list", None, "Hypervisors to query for instances"), |
196 |
], None, "Returns the list of running instances on the given nodes"), |
197 |
("instance_reboot", SINGLE, TMO_NORMAL, [
|
198 |
("inst", ED_INST_DICT, "Instance object"), |
199 |
("reboot_type", None, None), |
200 |
("shutdown_timeout", None, None), |
201 |
], None, "Returns the list of running instances on the given nodes"), |
202 |
("instance_shutdown", SINGLE, TMO_NORMAL, [
|
203 |
("instance", ED_INST_DICT, "Instance object"), |
204 |
("timeout", None, None), |
205 |
], None, "Stops an instance"), |
206 |
("instance_run_rename", SINGLE, TMO_SLOW, [
|
207 |
("instance", ED_INST_DICT, "Instance object"), |
208 |
("old_name", None, None), |
209 |
("debug", None, None), |
210 |
], None, "Run the OS rename script for an instance"), |
211 |
("instance_migratable", SINGLE, TMO_NORMAL, [
|
212 |
("instance", ED_INST_DICT, "Instance object"), |
213 |
], None, "Checks whether the given instance can be migrated"), |
214 |
("migration_info", SINGLE, TMO_NORMAL, [
|
215 |
("instance", ED_INST_DICT, "Instance object"), |
216 |
], None,
|
217 |
"Gather the information necessary to prepare an instance migration"),
|
218 |
("accept_instance", SINGLE, TMO_NORMAL, [
|
219 |
("instance", ED_INST_DICT, "Instance object"), |
220 |
("info", None, "Result for the call_migration_info call"), |
221 |
("target", None, "Target hostname (usually an IP address)"), |
222 |
], None, "Prepare a node to accept an instance"), |
223 |
("instance_finalize_migration_dst", SINGLE, TMO_NORMAL, [
|
224 |
("instance", ED_INST_DICT, "Instance object"), |
225 |
("info", None, "Result for the call_migration_info call"), |
226 |
("success", None, "Whether the migration was a success or failure"), |
227 |
], None, "Finalize any target-node migration specific operation"), |
228 |
("instance_migrate", SINGLE, TMO_SLOW, [
|
229 |
("instance", ED_INST_DICT, "Instance object"), |
230 |
("target", None, "Target node name"), |
231 |
("live", None, "Whether the migration should be done live or not"), |
232 |
], None, "Migrate an instance"), |
233 |
("instance_finalize_migration_src", SINGLE, TMO_SLOW, [
|
234 |
("instance", ED_INST_DICT, "Instance object"), |
235 |
("success", None, "Whether the migration succeeded or not"), |
236 |
("live", None, "Whether the user requested a live migration or not"), |
237 |
], None, "Finalize the instance migration on the source node"), |
238 |
("instance_get_migration_status", SINGLE, TMO_SLOW, [
|
239 |
("instance", ED_INST_DICT, "Instance object"), |
240 |
], _MigrationStatusPostProc, "Report migration status"),
|
241 |
("instance_start", SINGLE, TMO_NORMAL, [
|
242 |
("instance_hvp_bep", ED_INST_DICT_HVP_BEP, None), |
243 |
("startup_paused", None, None), |
244 |
], None, "Starts an instance"), |
245 |
("instance_os_add", SINGLE, TMO_1DAY, [
|
246 |
("instance_osp", ED_INST_DICT_OSP, None), |
247 |
("reinstall", None, None), |
248 |
("debug", None, None), |
249 |
], None, "Starts an instance"), |
250 |
] |
251 |
|
252 |
_IMPEXP_CALLS = [ |
253 |
("import_start", SINGLE, TMO_NORMAL, [
|
254 |
("opts", ED_OBJECT_DICT, None), |
255 |
("instance", ED_INST_DICT, None), |
256 |
("component", None, None), |
257 |
("dest", ED_IMPEXP_IO, "Import destination"), |
258 |
], None, "Starts an import daemon"), |
259 |
("export_start", SINGLE, TMO_NORMAL, [
|
260 |
("opts", ED_OBJECT_DICT, None), |
261 |
("host", None, None), |
262 |
("port", None, None), |
263 |
("instance", ED_INST_DICT, None), |
264 |
("component", None, None), |
265 |
("source", ED_IMPEXP_IO, "Export source"), |
266 |
], None, "Starts an export daemon"), |
267 |
("impexp_status", SINGLE, TMO_FAST, [
|
268 |
("names", None, "Import/export names"), |
269 |
], _ImpExpStatusPostProc, "Gets the status of an import or export"),
|
270 |
("impexp_abort", SINGLE, TMO_NORMAL, [
|
271 |
("name", None, "Import/export name"), |
272 |
], None, "Aborts an import or export"), |
273 |
("impexp_cleanup", SINGLE, TMO_NORMAL, [
|
274 |
("name", None, "Import/export name"), |
275 |
], None, "Cleans up after an import or export"), |
276 |
("export_info", SINGLE, TMO_FAST, [
|
277 |
("path", None, None), |
278 |
], None, "Queries the export information in a given path"), |
279 |
("finalize_export", SINGLE, TMO_NORMAL, [
|
280 |
("instance", ED_INST_DICT, None), |
281 |
("snap_disks", ED_FINALIZE_EXPORT_DISKS, None), |
282 |
], None, "Request the completion of an export operation"), |
283 |
("export_list", MULTI, TMO_FAST, [], None, "Gets the stored exports list"), |
284 |
("export_remove", SINGLE, TMO_FAST, [
|
285 |
("export", None, None), |
286 |
], None, "Requests removal of a given export"), |
287 |
] |
288 |
|
289 |
_X509_CALLS = [ |
290 |
("x509_cert_create", SINGLE, TMO_NORMAL, [
|
291 |
("validity", None, "Validity in seconds"), |
292 |
], None, "Creates a new X509 certificate for SSL/TLS"), |
293 |
("x509_cert_remove", SINGLE, TMO_NORMAL, [
|
294 |
("name", None, "Certificate name"), |
295 |
], None, "Removes a X509 certificate"), |
296 |
] |
297 |
|
298 |
_BLOCKDEV_CALLS = [ |
299 |
("bdev_sizes", MULTI, TMO_URGENT, [
|
300 |
("devices", None, None), |
301 |
], None, "Gets the sizes of requested block devices present on a node"), |
302 |
("blockdev_create", SINGLE, TMO_NORMAL, [
|
303 |
("bdev", ED_OBJECT_DICT, None), |
304 |
("size", None, None), |
305 |
("owner", None, None), |
306 |
("on_primary", None, None), |
307 |
("info", None, None), |
308 |
], None, "Request creation of a given block device"), |
309 |
("blockdev_wipe", SINGLE, TMO_SLOW, [
|
310 |
("bdev", ED_OBJECT_DICT, None), |
311 |
("offset", None, None), |
312 |
("size", None, None), |
313 |
], None,
|
314 |
"Request wipe at given offset with given size of a block device"),
|
315 |
("blockdev_remove", SINGLE, TMO_NORMAL, [
|
316 |
("bdev", ED_OBJECT_DICT, None), |
317 |
], None, "Request removal of a given block device"), |
318 |
("blockdev_pause_resume_sync", SINGLE, TMO_NORMAL, [
|
319 |
("disks", ED_OBJECT_DICT_LIST, None), |
320 |
("pause", None, None), |
321 |
], None, "Request a pause/resume of given block device"), |
322 |
("blockdev_assemble", SINGLE, TMO_NORMAL, [
|
323 |
("disk", ED_OBJECT_DICT, None), |
324 |
("owner", None, None), |
325 |
("on_primary", None, None), |
326 |
("idx", None, None), |
327 |
], None, "Request assembling of a given block device"), |
328 |
("blockdev_shutdown", SINGLE, TMO_NORMAL, [
|
329 |
("disk", ED_OBJECT_DICT, None), |
330 |
], None, "Request shutdown of a given block device"), |
331 |
("blockdev_addchildren", SINGLE, TMO_NORMAL, [
|
332 |
("bdev", ED_OBJECT_DICT, None), |
333 |
("ndevs", ED_OBJECT_DICT_LIST, None), |
334 |
], None, "Request adding a list of children to a (mirroring) device"), |
335 |
("blockdev_removechildren", SINGLE, TMO_NORMAL, [
|
336 |
("bdev", ED_OBJECT_DICT, None), |
337 |
("ndevs", ED_OBJECT_DICT_LIST, None), |
338 |
], None, "Request removing a list of children from a (mirroring) device"), |
339 |
("blockdev_close", SINGLE, TMO_NORMAL, [
|
340 |
("instance_name", None, None), |
341 |
("disks", ED_OBJECT_DICT_LIST, None), |
342 |
], None, "Closes the given block devices"), |
343 |
("blockdev_getsize", SINGLE, TMO_NORMAL, [
|
344 |
("disks", ED_OBJECT_DICT_LIST, None), |
345 |
], None, "Returns the size of the given disks"), |
346 |
("drbd_disconnect_net", MULTI, TMO_NORMAL, [
|
347 |
("nodes_ip", None, None), |
348 |
("disks", ED_OBJECT_DICT_LIST, None), |
349 |
], None, "Disconnects the network of the given drbd devices"), |
350 |
("drbd_attach_net", MULTI, TMO_NORMAL, [
|
351 |
("nodes_ip", None, None), |
352 |
("disks", ED_OBJECT_DICT_LIST, None), |
353 |
("instance_name", None, None), |
354 |
("multimaster", None, None), |
355 |
], None, "Connects the given DRBD devices"), |
356 |
("drbd_wait_sync", MULTI, TMO_SLOW, [
|
357 |
("nodes_ip", None, None), |
358 |
("disks", ED_OBJECT_DICT_LIST, None), |
359 |
], None, "Waits for the synchronization of drbd devices is complete"), |
360 |
("blockdev_grow", SINGLE, TMO_NORMAL, [
|
361 |
("cf_bdev", ED_OBJECT_DICT, None), |
362 |
("amount", None, None), |
363 |
("dryrun", None, None), |
364 |
], None, "Request a snapshot of the given block device"), |
365 |
("blockdev_export", SINGLE, TMO_1DAY, [
|
366 |
("cf_bdev", ED_OBJECT_DICT, None), |
367 |
("dest_node", None, None), |
368 |
("dest_path", None, None), |
369 |
("cluster_name", None, None), |
370 |
], None, "Export a given disk to another node"), |
371 |
("blockdev_snapshot", SINGLE, TMO_NORMAL, [
|
372 |
("cf_bdev", ED_OBJECT_DICT, None), |
373 |
], None, "Export a given disk to another node"), |
374 |
("blockdev_rename", SINGLE, TMO_NORMAL, [
|
375 |
("devlist", ED_BLOCKDEV_RENAME, None), |
376 |
], None, "Request rename of the given block devices"), |
377 |
("blockdev_find", SINGLE, TMO_NORMAL, [
|
378 |
("disk", ED_OBJECT_DICT, None), |
379 |
], _BlockdevFindPostProc, |
380 |
"Request identification of a given block device"),
|
381 |
("blockdev_getmirrorstatus", SINGLE, TMO_NORMAL, [
|
382 |
("disks", ED_OBJECT_DICT_LIST, None), |
383 |
], _BlockdevGetMirrorStatusPostProc, |
384 |
"Request status of a (mirroring) device"),
|
385 |
("blockdev_getmirrorstatus_multi", MULTI, TMO_NORMAL, [
|
386 |
("node_disks", ED_NODE_TO_DISK_DICT, None), |
387 |
], _BlockdevGetMirrorStatusMultiPostProc, |
388 |
"Request status of (mirroring) devices from multiple nodes"),
|
389 |
] |
390 |
|
391 |
_OS_CALLS = [ |
392 |
("os_diagnose", MULTI, TMO_FAST, [], None, |
393 |
"Request a diagnose of OS definitions"),
|
394 |
("os_validate", MULTI, TMO_FAST, [
|
395 |
("required", None, None), |
396 |
("name", None, None), |
397 |
("checks", None, None), |
398 |
("params", None, None), |
399 |
], None, "Run a validation routine for a given OS"), |
400 |
("os_get", SINGLE, TMO_FAST, [
|
401 |
("name", None, None), |
402 |
], _OsGetPostProc, "Returns an OS definition"),
|
403 |
] |
404 |
|
405 |
_NODE_CALLS = [ |
406 |
("node_has_ip_address", SINGLE, TMO_FAST, [
|
407 |
("address", None, "IP address"), |
408 |
], None, "Checks if a node has the given IP address"), |
409 |
("node_info", MULTI, TMO_URGENT, [
|
410 |
("vg_name", None, |
411 |
"Name of the volume group to ask for disk space information"),
|
412 |
("hypervisor_type", None, |
413 |
"Name of the hypervisor to ask for memory information"),
|
414 |
], None, "Return node information"), |
415 |
("node_verify", MULTI, TMO_NORMAL, [
|
416 |
("checkdict", None, None), |
417 |
("cluster_name", None, None), |
418 |
], None, "Request verification of given parameters"), |
419 |
("node_volumes", MULTI, TMO_FAST, [], None, "Gets all volumes on node(s)"), |
420 |
("node_demote_from_mc", SINGLE, TMO_FAST, [], None, |
421 |
"Demote a node from the master candidate role"),
|
422 |
("node_powercycle", SINGLE, TMO_NORMAL, [
|
423 |
("hypervisor", None, "Hypervisor type"), |
424 |
], None, "Tries to powercycle a node"), |
425 |
] |
426 |
|
427 |
_MISC_CALLS = [ |
428 |
("lv_list", MULTI, TMO_URGENT, [
|
429 |
("vg_name", None, None), |
430 |
], None, "Gets the logical volumes present in a given volume group"), |
431 |
("vg_list", MULTI, TMO_URGENT, [], None, "Gets the volume group list"), |
432 |
("bridges_exist", SINGLE, TMO_URGENT, [
|
433 |
("bridges_list", None, "Bridges which must be present on remote node"), |
434 |
], None, "Checks if a node has all the bridges given"), |
435 |
("etc_hosts_modify", SINGLE, TMO_NORMAL, [
|
436 |
("mode", None, |
437 |
"Mode to operate; currently L{constants.ETC_HOSTS_ADD} or"
|
438 |
" L{constants.ETC_HOSTS_REMOVE}"),
|
439 |
("name", None, "Hostname to be modified"), |
440 |
("ip", None, "IP address (L{constants.ETC_HOSTS_ADD} only)"), |
441 |
], None, "Modify hosts file with name"), |
442 |
("drbd_helper", MULTI, TMO_URGENT, [], None, "Gets DRBD helper"), |
443 |
("run_oob", SINGLE, TMO_NORMAL, [
|
444 |
("oob_program", None, None), |
445 |
("command", None, None), |
446 |
("remote_node", None, None), |
447 |
("timeout", None, None), |
448 |
], None, "Runs out-of-band command"), |
449 |
("hooks_runner", MULTI, TMO_NORMAL, [
|
450 |
("hpath", None, None), |
451 |
("phase", None, None), |
452 |
("env", None, None), |
453 |
], None, "Call the hooks runner"), |
454 |
("iallocator_runner", SINGLE, TMO_NORMAL, [
|
455 |
("name", None, "Iallocator name"), |
456 |
("idata", None, "JSON-encoded input string"), |
457 |
], None, "Call an iallocator on a remote node"), |
458 |
("test_delay", MULTI, None, [ |
459 |
("duration", None, None), |
460 |
], None, "Sleep for a fixed time on given node(s)"), |
461 |
("hypervisor_validate_params", MULTI, TMO_NORMAL, [
|
462 |
("hvname", None, "Hypervisor name"), |
463 |
("hvfull", None, "Parameters to be validated"), |
464 |
], None, "Validate hypervisor params"), |
465 |
] |
466 |
|
467 |
CALLS = { |
468 |
"RpcClientDefault": \
|
469 |
_Prepare(_IMPEXP_CALLS + _X509_CALLS + _OS_CALLS + _NODE_CALLS + |
470 |
_FILE_STORAGE_CALLS + _MISC_CALLS + _INSTANCE_CALLS + |
471 |
_BLOCKDEV_CALLS + _STORAGE_CALLS), |
472 |
"RpcClientJobQueue": _Prepare([
|
473 |
("jobqueue_update", MULTI, TMO_URGENT, [
|
474 |
("file_name", None, None), |
475 |
("content", ED_COMPRESS, None), |
476 |
], None, "Update job queue file"), |
477 |
("jobqueue_purge", SINGLE, TMO_NORMAL, [], None, "Purge job queue"), |
478 |
("jobqueue_rename", MULTI, TMO_URGENT, [
|
479 |
("rename", None, None), |
480 |
], None, "Rename job queue file"), |
481 |
]), |
482 |
"RpcClientBootstrap": _Prepare([
|
483 |
("node_start_master_daemons", SINGLE, TMO_FAST, [
|
484 |
("no_voting", None, None), |
485 |
], None, "Starts master daemons on a node"), |
486 |
("node_activate_master_ip", SINGLE, TMO_FAST, [
|
487 |
("master_params", ED_OBJECT_DICT, "Network parameters of the master"), |
488 |
], None,
|
489 |
"Activates master IP on a node"),
|
490 |
("node_stop_master", SINGLE, TMO_FAST, [], None, |
491 |
"Deactivates master IP and stops master daemons on a node"),
|
492 |
("node_deactivate_master_ip", SINGLE, TMO_FAST, [
|
493 |
("master_params", ED_OBJECT_DICT, "Network parameters of the master"), |
494 |
], None,
|
495 |
"Deactivates master IP on a node"),
|
496 |
("node_change_master_netmask", SINGLE, TMO_FAST, [
|
497 |
("old_netmask", None, "The old value of the netmask"), |
498 |
("netmask", None, "The new value of the netmask"), |
499 |
("master_ip", None, "The master IP"), |
500 |
("master_netdev", None, "The master network device"), |
501 |
], None, "Change master IP netmask"), |
502 |
("node_leave_cluster", SINGLE, TMO_NORMAL, [
|
503 |
("modify_ssh_setup", None, None), |
504 |
], None, "Requests a node to clean the cluster information it has"), |
505 |
("master_info", MULTI, TMO_URGENT, [], None, "Query master info"), |
506 |
("version", MULTI, TMO_URGENT, [], None, "Query node version"), |
507 |
]), |
508 |
"RpcClientConfig": _Prepare([
|
509 |
("upload_file", MULTI, TMO_NORMAL, [
|
510 |
("file_name", ED_FILE_DETAILS, None), |
511 |
], None, "Upload a file"), |
512 |
("write_ssconf_files", MULTI, TMO_NORMAL, [
|
513 |
("values", None, None), |
514 |
], None, "Write ssconf files"), |
515 |
]), |
516 |
} |