Revision 38f9d2cf

b/lib/client/gnt_cluster.py
722 722
          opts.remove_uids is not None or
723 723
          opts.default_iallocator is not None or
724 724
          opts.reserved_lvs is not None or
725
          opts.master_netdev is not None or
725 726
          opts.prealloc_wipe_disks is not None):
726 727
    ToStderr("Please give at least one of the parameters.")
727 728
    return 1
......
796 797
                                  remove_uids=remove_uids,
797 798
                                  default_iallocator=opts.default_iallocator,
798 799
                                  prealloc_wipe_disks=opts.prealloc_wipe_disks,
800
                                  master_netdev=opts.master_netdev,
799 801
                                  reserved_lvs=opts.reserved_lvs)
800 802
  SubmitOpCode(op, opts=opts)
801 803
  return 0
......
953 955
    "{pause <timespec>|continue|info}", "Change watcher properties"),
954 956
  'modify': (
955 957
    SetClusterParams, ARGS_NONE,
956
    [BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT,
958
    [BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT, MASTER_NETDEV_OPT,
957 959
     NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
958 960
     UIDPOOL_OPT, ADD_UIDS_OPT, REMOVE_UIDS_OPT, DRBD_HELPER_OPT,
959 961
     NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT, RESERVED_LVS_OPT,
b/lib/cmdlib.py
2703 2703
    ("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
2704 2704
    ("drbd_helper", None, ht.TOr(ht.TString, ht.TNone)),
2705 2705
    ("default_iallocator", None, ht.TOr(ht.TString, ht.TNone)),
2706
    ("master_netdev", None, ht.TOr(ht.TString, ht.TNone)),
2706 2707
    ("reserved_lvs", None, ht.TOr(ht.TListOf(ht.TNonEmptyString), ht.TNone)),
2707 2708
    ("hidden_os", None, ht.TOr(ht.TListOf(\
2708 2709
          ht.TAnd(ht.TList,
......
3019 3020
    if self.op.blacklisted_os:
3020 3021
      helper_os("blacklisted_os", self.op.blacklisted_os, "blacklisted")
3021 3022

  
3023
    if self.op.master_netdev:
3024
      master = self.cfg.GetMasterNode()
3025
      feedback_fn("Shutting down master ip on the current netdev (%s)" %
3026
                  self.cluster.master_netdev)
3027
      result = self.rpc.call_node_stop_master(master, False)
3028
      result.Raise("Could not disable the master ip")
3029
      feedback_fn("Changing master_netdev from %s to %s" %
3030
                  (self.cluster.master_netdev, self.op.master_netdev))
3031
      self.cluster.master_netdev = self.op.master_netdev
3032

  
3022 3033
    self.cfg.Update(self.cluster, feedback_fn)
3023 3034

  
3035
    if self.op.master_netdev:
3036
      feedback_fn("Starting the master ip on the new master netdev (%s)" %
3037
                  self.op.master_netdev)
3038
      result = self.rpc.call_node_start_master(master, False, False)
3039
      if result.fail_msg:
3040
        self.LogWarning("Could not re-enable the master ip on"
3041
                        " the master, please restart manually: %s",
3042
                        result.fail_msg)
3043

  
3024 3044

  
3025 3045
def _UploadHelper(lu, nodes, fname):
3026 3046
  """Helper for uploading a file and showing warnings.
b/lib/opcodes.py
328 328
    "hidden_os",
329 329
    "blacklisted_os",
330 330
    "prealloc_wipe_disks",
331
    "master_netdev",
331 332
    ]
332 333

  
333 334

  
b/man/gnt-cluster.rst
384 384
| [-I *default instance allocator*]
385 385
| [--reserved-lvs=*NAMES*]
386 386
| [--node-parameters *ndparams*]
387
| [--master-netdev *interface-name*]
387 388

  
388 389
Modify the options for the cluster.
389 390

  
390 391
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
391 392
``--hypervisor-parameters``, ``--backend-parameters``,
392 393
``--nic-parameters``, ``--maintain-node-health``,
393
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters`` options
394
are described in the **init** command.
394
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``,
395
``--master-netdev`` options are described in the **init** command.
395 396

  
396 397
The ``-C`` option specifies the ``candidate_pool_size`` cluster
397 398
parameter. This is the number of nodes that the master will try to

Also available in: Unified diff