summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Asleson <tasleson@redhat.com>2017-06-02 12:22:24 -0500
committerTony Asleson <tasleson@redhat.com>2017-06-02 12:32:43 -0500
commit192d142e1cd38c1593ec76502d8424997ec01ec8 (patch)
treec2ba7cfdc05ac46053803ca44ef3bd0edc81d4c9
parent3217e0cfeaed313332a0b69437ee87ca1f4b9e5e (diff)
downloadlvm2-192d142e1cd38c1593ec76502d8424997ec01ec8.tar.gz
lvmdbusd: cmdhandler.py vg_reduce, remove extranous '--all'
vgreduce previously allowed --all and --removemissing together even though it only actual did the remove missing. The lvm dbus daemon was passing --all anytime there was no entries in pv_object_paths. This change supplies --all if and only if we are not removing missing and the pv_object_paths is empty. Vgreduce has and continues to enforce the invalid combination of supplying a device list when you specify --all or --removemissing so we do not need to check for that invalid combination explicitly in the lvm dbus service as it's already covered. Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1455471
-rw-r--r--daemons/lvmdbusd/cmdhandler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index 8ed38cb05..a883f1e43 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -618,10 +618,10 @@ 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:
cmd.append('--removemissing')
+ elif len(pv_devices) == 0:
+ cmd.append('--all')
cmd.append(vg_name)
cmd.extend(pv_devices)