Revision ed14ed48
b/scripts/gnt-cluster | ||
---|---|---|
63 | 63 |
if opts.lvm_storage and not opts.vg_name: |
64 | 64 |
vg_name = constants.DEFAULT_VG |
65 | 65 |
|
66 |
if not opts.drbd_storage and opts.drbd_helper: |
|
67 |
ToStderr("Options --no-drbd-storage and --drbd-usermode-helper conflict.") |
|
68 |
return 1 |
|
69 |
|
|
70 |
drbd_helper = opts.drbd_helper |
|
71 |
if opts.drbd_storage and not opts.drbd_helper: |
|
72 |
drbd_helper = constants.DEFAULT_DRBD_HELPER |
|
73 |
|
|
66 | 74 |
hvlist = opts.enabled_hypervisors |
67 | 75 |
if hvlist is None: |
68 | 76 |
hvlist = constants.DEFAULT_ENABLED_HYPERVISOR |
... | ... | |
111 | 119 |
modify_etc_hosts=opts.modify_etc_hosts, |
112 | 120 |
modify_ssh_setup=opts.modify_ssh_setup, |
113 | 121 |
maintain_node_health=opts.maintain_node_health, |
122 |
drbd_helper=drbd_helper, |
|
114 | 123 |
uid_pool=uid_pool, |
115 | 124 |
) |
116 | 125 |
op = opcodes.OpPostInitCluster() |
... | ... | |
286 | 295 |
convert=opts.roman_integers)) |
287 | 296 |
ToStdout(" - master netdev: %s", result["master_netdev"]) |
288 | 297 |
ToStdout(" - lvm volume group: %s", result["volume_group_name"]) |
298 |
ToStdout(" - drbd usermode helper: %s", result["drbd_usermode_helper"]) |
|
289 | 299 |
ToStdout(" - file storage path: %s", result["file_storage_dir"]) |
290 | 300 |
ToStdout(" - maintenance of node health: %s", |
291 | 301 |
result["maintain_node_health"]) |
... | ... | |
643 | 653 |
|
644 | 654 |
""" |
645 | 655 |
if not (not opts.lvm_storage or opts.vg_name or |
656 |
not opts.drbd_storage or opts.drbd_helper or |
|
646 | 657 |
opts.enabled_hypervisors or opts.hvparams or |
647 | 658 |
opts.beparams or opts.nicparams or |
648 | 659 |
opts.candidate_pool_size is not None or |
... | ... | |
661 | 672 |
if not opts.lvm_storage: |
662 | 673 |
vg_name = "" |
663 | 674 |
|
675 |
drbd_helper = opts.drbd_helper |
|
676 |
if not opts.drbd_storage and opts.drbd_helper: |
|
677 |
ToStderr("Options --no-drbd-storage and --drbd-usermode-helper conflict.") |
|
678 |
return 1 |
|
679 |
|
|
680 |
if not opts.drbd_storage: |
|
681 |
drbd_helper = "" |
|
682 |
|
|
664 | 683 |
hvlist = opts.enabled_hypervisors |
665 | 684 |
if hvlist is not None: |
666 | 685 |
hvlist = hvlist.split(",") |
... | ... | |
692 | 711 |
remove_uids = uidpool.ParseUidPool(remove_uids) |
693 | 712 |
|
694 | 713 |
op = opcodes.OpSetClusterParams(vg_name=vg_name, |
714 |
drbd_helper=drbd_helper, |
|
695 | 715 |
enabled_hypervisors=hvlist, |
696 | 716 |
hvparams=hvparams, |
697 | 717 |
os_hvp=None, |
... | ... | |
784 | 804 |
HVLIST_OPT, MAC_PREFIX_OPT, MASTER_NETDEV_OPT, NIC_PARAMS_OPT, |
785 | 805 |
NOLVM_STORAGE_OPT, NOMODIFY_ETCHOSTS_OPT, NOMODIFY_SSH_SETUP_OPT, |
786 | 806 |
SECONDARY_IP_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT, |
787 |
UIDPOOL_OPT], |
|
807 |
UIDPOOL_OPT, DRBD_HELPER_OPT, NODRBD_STORAGE_OPT],
|
|
788 | 808 |
"[opts...] <cluster_name>", "Initialises a new cluster configuration"), |
789 | 809 |
'destroy': ( |
790 | 810 |
DestroyCluster, ARGS_NONE, [YES_DOIT_OPT], |
... | ... | |
854 | 874 |
SetClusterParams, ARGS_NONE, |
855 | 875 |
[BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT, |
856 | 876 |
NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT, |
857 |
UIDPOOL_OPT, ADD_UIDS_OPT, REMOVE_UIDS_OPT], |
|
877 |
UIDPOOL_OPT, ADD_UIDS_OPT, REMOVE_UIDS_OPT, DRBD_HELPER_OPT, |
|
878 |
NODRBD_STORAGE_OPT], |
|
858 | 879 |
"[opts...]", |
859 | 880 |
"Alters the parameters of the cluster"), |
860 | 881 |
"renew-crypto": ( |
Also available in: Unified diff