]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: remove the -a flag from api.lvm.get_pvs
authorAndrew Schoen <aschoen@redhat.com>
Thu, 18 Jan 2018 17:05:32 +0000 (11:05 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 18 Jan 2018 17:12:31 +0000 (11:12 -0600)
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 <aschoen@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py

index 1c3566b4ad36453ac002f149f544f4dd608d89ae..3931442072eae00303d3d998143c32a2429c0d42 100644 (file)
@@ -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)