From b8a8fbe114ac0a1df107de71e18ef9a0ec2f450f Mon Sep 17 00:00:00 2001 From: Guido Trotter Date: Tue, 12 May 2009 18:34:42 +0100 Subject: [PATCH] gnt-cluster modify: fix --no-lvm-storage Currently doing a gnt-cluster-modify --no-lvm-storage is silently ignored, as it passes a None value in vg_name, which is the same as not modifying that parameter. Explicitely set the passed value to '', so the non-true not-None value can be evaluate to actually remove a volume group. Signed-off-by: Guido Trotter Reviewed-by: Iustin Pop --- scripts/gnt-cluster | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster index 9a17b96..99cab31 100755 --- a/scripts/gnt-cluster +++ b/scripts/gnt-cluster @@ -467,6 +467,8 @@ def SetClusterParams(opts, args): if not opts.lvm_storage and opts.vg_name: ToStdout("Options --no-lvm-storage and --vg-name conflict.") return 1 + elif not opts.lvm_storage: + vg_name = '' hvlist = opts.enabled_hypervisors if hvlist is not None: @@ -480,7 +482,7 @@ def SetClusterParams(opts, args): beparams = opts.beparams utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES) - op = opcodes.OpSetClusterParams(vg_name=opts.vg_name, + op = opcodes.OpSetClusterParams(vg_name=vg_name, enabled_hypervisors=hvlist, hvparams=hvparams, beparams=beparams, -- 1.7.10.4