From: Andrew Schoen Date: Thu, 18 Jan 2018 17:05:32 +0000 (-0600) Subject: ceph-volume: remove the -a flag from api.lvm.get_pvs X-Git-Tag: v12.2.3~79^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8fd6f29ee3988d3158467e9cf447e63c7d3485e5;p=ceph.git ceph-volume: remove the -a flag from api.lvm.get_pvs When we run `pvs -a` it returns all pvs, even ones that have been recently deleted. Because of this pvs that have just been zapped with `lvm zap` show up and can cause issues if a device is zapped more than once. Signed-off-by: Andrew Schoen (cherry picked from commit 10a349742cae909d1ebf0a0b3b49c88774929f53) --- diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 1c3566b4ad36..3931442072ea 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -124,10 +124,8 @@ def get_api_pvs(): """ fields = 'pv_name,pv_tags,pv_uuid,vg_name' - # note the use of `pvs -a` which will return every physical volume including - # ones that have not been initialized as "pv" by LVM stdout, stderr, returncode = process.call( - ['pvs', '-a', '--no-heading', '--separator=";"', '-o', fields] + ['pvs', '--no-heading', '--separator=";"', '-o', fields] ) return _output_parser(stdout, fields)