LGTM, thanks

On Wed, Nov 6, 2013 at 2:32 PM, Thomas Thrainer <[email protected]> wrote:

> OpenVSwitch node parameters were passed as separate command line flags.
> This was not only inconsistent with all other parameters
> (hypervisor-params, disk-params, ...), but also with the documented
> behavior in the man pages.
> Additionally, the special handling of the OVS related parameters
> disabled logic in LUNodeAdd, as ndparams was never None any more.
>
> This patch fixes those problems and treats OVS related parameters like
> all other node parameters.
>
> Signed-off-by: Thomas Thrainer <[email protected]>
> ---
>  lib/client/gnt_node.py | 33 +++++----------------------------
>  1 file changed, 5 insertions(+), 28 deletions(-)
>
> diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py
> index fbfab30..8986a9c 100644
> --- a/lib/client/gnt_node.py
> +++ b/lib/client/gnt_node.py
> @@ -123,18 +123,6 @@ IGNORE_STATUS_OPT = cli_option("--ignore-status",
> default=False,
>                                 help=("Ignore the Node(s) offline status"
>                                       " (potentially DANGEROUS)"))
>
> -OVS_OPT = cli_option("--ovs", default=False, action="store_true",
> dest="ovs",
> -                     help=("Enable OpenvSwitch on the new node. This will"
> -                           " initialize OpenvSwitch during gnt-node add"))
> -
> -OVS_NAME_OPT = cli_option("--ovs-name", action="store", dest="ovs_name",
> -                          type="string", default=None,
> -                          help=("Set name of OpenvSwitch to connect
> instances"))
> -
> -OVS_LINK_OPT = cli_option("--ovs-link", action="store", dest="ovs_link",
> -                          type="string", default=None,
> -                          help=("Physical trunk interface for
> OpenvSwitch"))
> -
>
>  def ConvertStorageType(user_storage_type):
>    """Converts a user storage type to its internal name.
> @@ -290,19 +278,9 @@ def AddNode(opts, args):
>
>    hv_state = dict(opts.hv_state)
>
> -  if not opts.ndparams:
> -    ndparams = {constants.ND_OVS: opts.ovs,
> -                constants.ND_OVS_NAME: opts.ovs_name,
> -                constants.ND_OVS_LINK: opts.ovs_link}
> -  else:
> -    ndparams = opts.ndparams
> -    ndparams[constants.ND_OVS] = opts.ovs
> -    ndparams[constants.ND_OVS_NAME] = opts.ovs_name
> -    ndparams[constants.ND_OVS_LINK] = opts.ovs_link
> -
>    op = opcodes.OpNodeAdd(node_name=args[0], secondary_ip=sip,
>                           readd=opts.readd, group=opts.nodegroup,
> -                         vm_capable=opts.vm_capable, ndparams=ndparams,
> +                         vm_capable=opts.vm_capable,
> ndparams=opts.ndparams,
>                           master_capable=opts.master_capable,
>                           disk_state=disk_state,
>                           hv_state=hv_state)
> @@ -1096,12 +1074,11 @@ commands = {
>    "add": (
>      AddNode, [ArgHost(min=1, max=1)],
>      [SECONDARY_IP_OPT, READD_OPT, NOSSH_KEYCHECK_OPT, NODE_FORCE_JOIN_OPT,
> -     NONODE_SETUP_OPT, VERBOSE_OPT, OVS_OPT, OVS_NAME_OPT, OVS_LINK_OPT,
> -     NODEGROUP_OPT, PRIORITY_OPT, CAPAB_MASTER_OPT, CAPAB_VM_OPT,
> -     NODE_PARAMS_OPT, HV_STATE_OPT, DISK_STATE_OPT],
> +     NONODE_SETUP_OPT, VERBOSE_OPT, NODEGROUP_OPT, PRIORITY_OPT,
> +     CAPAB_MASTER_OPT, CAPAB_VM_OPT, NODE_PARAMS_OPT, HV_STATE_OPT,
> +     DISK_STATE_OPT],
>      "[-s ip] [--readd] [--no-ssh-key-check] [--force-join]"
> -    " [--no-node-setup] [--verbose] [--network] [--ovs] [--ovs-name
> <vswitch>]"
> -    " [--ovs-link <phys. if>] <node_name>",
> +    " [--no-node-setup] [--verbose] [--network] <node_name>",
>      "Add a node to the cluster"),
>    "evacuate": (
>      EvacuateNode, ARGS_ONE_NODE,
> --
> 1.8.4.1
>
>


Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to