Commit b8a8fbe1 authored by Guido Trotter's avatar Guido Trotter
Browse files

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: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent b2482333
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment