diff --git a/lib/cli.py b/lib/cli.py index 8e577409f096b3c70288185db26ddeb49c73093d..e2e1e313fe70e0aebc27341054295a527e90556c 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -947,10 +947,11 @@ MAC_PREFIX_OPT = cli_option("-m", "--mac-prefix", dest="mac_prefix", MASTER_NETDEV_OPT = cli_option("--master-netdev", dest="master_netdev", help="Specify the node interface (cluster-wide)" - " on which the master IP address will be added " - " [%s]" % constants.DEFAULT_BRIDGE, + " on which the master IP address will be added" + " (cluster init default: %s)" % + constants.DEFAULT_BRIDGE, metavar="NETDEV", - default=constants.DEFAULT_BRIDGE) + default=None) GLOBAL_FILEDIR_OPT = cli_option("--file-storage-dir", dest="file_storage_dir", help="Specify the default directory (cluster-" diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index 7476a00fb6c48af37edb895f765740d5b5c6f089..91dafaba79dfe18d8b1431a2e1a8949e57daf969 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -70,6 +70,10 @@ def InitCluster(opts, args): if opts.drbd_storage and not opts.drbd_helper: drbd_helper = constants.DEFAULT_DRBD_HELPER + master_netdev = opts.master_netdev + if master_netdev is None: + master_netdev = constants.DEFAULT_BRIDGE + hvlist = opts.enabled_hypervisors if hvlist is None: hvlist = constants.DEFAULT_ENABLED_HYPERVISOR @@ -124,7 +128,7 @@ def InitCluster(opts, args): secondary_ip=opts.secondary_ip, vg_name=vg_name, mac_prefix=opts.mac_prefix, - master_netdev=opts.master_netdev, + master_netdev=master_netdev, file_storage_dir=opts.file_storage_dir, enabled_hypervisors=hvlist, hvparams=hvparams,