diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py index a73ed7cbb8b303b2964f40b64c74cf4802b7d41d..804ec9a326a35a64c3a873a24b07c443649d0a10 100644 --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -215,7 +215,7 @@ def AddNode(opts, args): op = opcodes.OpAddNode(node_name=args[0], secondary_ip=sip, readd=opts.readd, group=opts.nodegroup, - vm_capable=opts.vm_capable, + vm_capable=opts.vm_capable, ndparams=opts.ndparams, master_capable=opts.master_capable) SubmitOpCode(op, opts=opts) @@ -657,7 +657,8 @@ def SetNodeParams(opts, args): """ all_changes = [opts.master_candidate, opts.drained, opts.offline, - opts.master_capable, opts.vm_capable, opts.secondary_ip] + opts.master_capable, opts.vm_capable, opts.secondary_ip, + opts.ndparams] if all_changes.count(None) == len(all_changes): ToStderr("Please give at least one of the parameters.") return 1 @@ -670,6 +671,7 @@ def SetNodeParams(opts, args): vm_capable=opts.vm_capable, secondary_ip=opts.secondary_ip, force=opts.force, + ndparams=opts.ndparams, auto_promote=opts.auto_promote) # even if here we process the result, we allow submit only @@ -687,7 +689,7 @@ commands = { AddNode, [ArgHost(min=1, max=1)], [SECONDARY_IP_OPT, READD_OPT, NOSSH_KEYCHECK_OPT, NONODE_SETUP_OPT, VERBOSE_OPT, NODEGROUP_OPT, PRIORITY_OPT, CAPAB_MASTER_OPT, - CAPAB_VM_OPT], + CAPAB_VM_OPT, NODE_PARAMS_OPT], "[-s ip] [--readd] [--no-ssh-key-check] [--no-node-setup] [--verbose] " " <node_name>", "Add a node to the cluster"), @@ -723,7 +725,7 @@ commands = { SetNodeParams, ARGS_ONE_NODE, [FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT, CAPAB_MASTER_OPT, CAPAB_VM_OPT, SECONDARY_IP_OPT, - AUTO_PROMOTE_OPT, DRY_RUN_OPT, PRIORITY_OPT], + AUTO_PROMOTE_OPT, DRY_RUN_OPT, PRIORITY_OPT, NODE_PARAMS_OPT], "<node_name>", "Alters the parameters of a node"), 'powercycle': ( PowercycleNode, ARGS_ONE_NODE, diff --git a/man/gnt-node.rst b/man/gnt-node.rst index ff4518f135f95e0480ddade0747970be54b58145..5d288a6a995b13f3948e5bedbdb15d4bd637c896 100644 --- a/man/gnt-node.rst +++ b/man/gnt-node.rst @@ -23,9 +23,10 @@ COMMANDS ADD ~~~ -**add** [--readd] [-s *secondary\_ip*] [-g *nodegroup*] -[--master-capable=``yes|no``] [--vm-capable=``yes|no``] -{*nodename*} +| **add** [--readd] [-s *secondary\_ip*] [-g *nodegroup*] +| [--master-capable=``yes|no``] [--vm-capable=``yes|no``] +| [--node-parameters *ndparams*] +| {*nodename*} Adds the given node to the cluster. @@ -52,8 +53,9 @@ The ``-g`` is used to add the new node into a specific node group, specified by UUID or name. If only one node group exists you can skip this option, otherwise it's mandatory. -The ``vm_capable`` and ``master_capable`` options are described in -**ganeti**(7), and are used to set the properties of the new node. +The ``vm_capable``, ``master_capable`` and ``ndparams`` options are +described in **ganeti**(7), and are used to set the properties of the +new node. Example:: @@ -350,6 +352,7 @@ MODIFY | [--master-candidate=``yes|no``] [--drained=``yes|no``] [--offline=``yes|no``] | [--master-capable=``yes|no``] [--vm-capable=``yes|no``] [--auto-promote] | [-s *secondary_ip*] +| [--node-parameters *ndparams*] | {*node*} This command changes the role of the node. Each options takes