summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2017-05-31 11:59:50 +0200
committerMarian Csontos <mcsontos@redhat.com>2017-05-31 11:59:50 +0200
commitb3306383ba7cf77399e88da3bf1ae5cde9b0eb43 (patch)
treedb76d6ee8f0369fea63f033e44b1287478696810
parent3719f4bc5441cb5f29ad4beb91ccaa6b234ea8e1 (diff)
downloadlvm2-b3306383ba7cf77399e88da3bf1ae5cde9b0eb43.tar.gz
dbusd: Fix vgreduce --removemissing case
- When using --removemissing --all was added, as no PVs are expected. - Add a check no PVs are passed with missing.
-rw-r--r--daemons/lvmdbusd/cmdhandler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index 8ed38cb05..ea02cdfb3 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -618,10 +618,11 @@ def vg_reduce(vg_name, missing, pv_devices, reduce_options):
cmd = ['vgreduce']
cmd.extend(options_to_cli_args(reduce_options))
- if len(pv_devices) == 0:
- cmd.append('--all')
if missing:
+ assert len(pv_devices) == 0
cmd.append('--removemissing')
+ elif len(pv_devices) == 0:
+ cmd.append('--all')
cmd.append(vg_name)
cmd.extend(pv_devices)