Revision bf689b7a lib/client/gnt_cluster.py
b/lib/client/gnt_cluster.py | ||
---|---|---|
133 | 133 |
if opts.prealloc_wipe_disks is None: |
134 | 134 |
opts.prealloc_wipe_disks = False |
135 | 135 |
|
136 |
external_ip_setup_script = opts.use_external_mip_script |
|
137 |
if external_ip_setup_script is None: |
|
138 |
external_ip_setup_script = False |
|
139 |
|
|
136 | 140 |
try: |
137 | 141 |
primary_ip_version = int(opts.primary_ip_version) |
138 | 142 |
except (ValueError, TypeError), err: |
... | ... | |
169 | 173 |
default_iallocator=opts.default_iallocator, |
170 | 174 |
primary_ip_version=primary_ip_version, |
171 | 175 |
prealloc_wipe_disks=opts.prealloc_wipe_disks, |
176 |
use_external_mip_script=external_ip_setup_script, |
|
172 | 177 |
) |
173 | 178 |
op = opcodes.OpClusterPostInit() |
174 | 179 |
SubmitOpCode(op, opts=opts) |
... | ... | |
381 | 386 |
convert=opts.roman_integers)) |
382 | 387 |
ToStdout(" - master netdev: %s", result["master_netdev"]) |
383 | 388 |
ToStdout(" - master netmask: %s", result["master_netmask"]) |
389 |
ToStdout(" - use external master IP address setup script: %s", |
|
390 |
result["use_external_mip_script"]) |
|
384 | 391 |
ToStdout(" - lvm volume group: %s", result["volume_group_name"]) |
385 | 392 |
if result["reserved_lvs"]: |
386 | 393 |
reserved_lvs = utils.CommaJoin(result["reserved_lvs"]) |
... | ... | |
879 | 886 |
opts.reserved_lvs is not None or |
880 | 887 |
opts.master_netdev is not None or |
881 | 888 |
opts.master_netmask is not None or |
889 |
opts.use_external_mip_script is not None or |
|
882 | 890 |
opts.prealloc_wipe_disks is not None): |
883 | 891 |
ToStderr("Please give at least one of the parameters.") |
884 | 892 |
return 1 |
... | ... | |
945 | 953 |
ToStderr("The --master-netmask option expects an int parameter.") |
946 | 954 |
return 1 |
947 | 955 |
|
956 |
ext_ip_script = opts.use_external_mip_script |
|
957 |
|
|
948 | 958 |
op = opcodes.OpClusterSetParams(vg_name=vg_name, |
949 | 959 |
drbd_helper=drbd_helper, |
950 | 960 |
enabled_hypervisors=hvlist, |
... | ... | |
962 | 972 |
prealloc_wipe_disks=opts.prealloc_wipe_disks, |
963 | 973 |
master_netdev=opts.master_netdev, |
964 | 974 |
master_netmask=opts.master_netmask, |
965 |
reserved_lvs=opts.reserved_lvs) |
|
975 |
reserved_lvs=opts.reserved_lvs, |
|
976 |
use_external_mip_script=ext_ip_script, |
|
977 |
) |
|
966 | 978 |
SubmitOpCode(op, opts=opts) |
967 | 979 |
return 0 |
968 | 980 |
|
... | ... | |
1364 | 1376 |
NOMODIFY_SSH_SETUP_OPT, SECONDARY_IP_OPT, VG_NAME_OPT, |
1365 | 1377 |
MAINTAIN_NODE_HEALTH_OPT, UIDPOOL_OPT, DRBD_HELPER_OPT, NODRBD_STORAGE_OPT, |
1366 | 1378 |
DEFAULT_IALLOCATOR_OPT, PRIMARY_IP_VERSION_OPT, PREALLOC_WIPE_DISKS_OPT, |
1367 |
NODE_PARAMS_OPT, GLOBAL_SHARED_FILEDIR_OPT], |
|
1379 |
NODE_PARAMS_OPT, GLOBAL_SHARED_FILEDIR_OPT, USE_EXTERNAL_MIP_SCRIPT],
|
|
1368 | 1380 |
"[opts...] <cluster_name>", "Initialises a new cluster configuration"), |
1369 | 1381 |
"destroy": ( |
1370 | 1382 |
DestroyCluster, ARGS_NONE, [YES_DOIT_OPT], |
... | ... | |
1441 | 1453 |
MAINTAIN_NODE_HEALTH_OPT, UIDPOOL_OPT, ADD_UIDS_OPT, REMOVE_UIDS_OPT, |
1442 | 1454 |
DRBD_HELPER_OPT, NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT, |
1443 | 1455 |
RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT, |
1444 |
NODE_PARAMS_OPT], |
|
1456 |
NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT],
|
|
1445 | 1457 |
"[opts...]", |
1446 | 1458 |
"Alters the parameters of the cluster"), |
1447 | 1459 |
"renew-crypto": ( |
Also available in: Unified diff