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

LUSetClusterParams: improve volume group removal

Currently LUSetClusterParams will remove the volume group if the vg_name
field passed in is not true, but not None. Setting the target volume
group to False or the empty string, though, is a bad idea because it's
not a boolean value, and at cluster init we set it to None if
--no-lvm-storage is passed. With this fix we handle '' (or any other
non-None false value) as the "unset" value, but actually store None in
the config.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent a8001106
......@@ -1523,8 +1523,11 @@ class LUSetClusterParams(LogicalUnit):
if self.op.vg_name is not None:
if self.op.vg_name != self.cfg.GetVGName():
new_volume = self.op.vg_name
if not new_volume:
new_volume = None
if new_volume != self.cfg.GetVGName():
feedback_fn("Cluster LVM configuration already in desired"
" state, not changing")
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