From: Alfredo Deza Date: Thu, 7 Sep 2017 20:56:55 +0000 (-0400) Subject: ceph-volume lvm.activate allow not using osd_id X-Git-Tag: v12.2.1~45^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=12d638afea087189a1d3f350dd87185b0ade6617;p=ceph.git ceph-volume lvm.activate allow not using osd_id Signed-off-by: Alfredo Deza (cherry picked from commit 99a8a719695591558da29b3d16a347d5bff8bf3d) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index d7271e3f6dfc..5a755672a95d 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -63,7 +63,10 @@ class Activate(object): def activate(self, args): lvs = api.Volumes() # filter them down for the OSD ID and FSID we need to activate - lvs.filter(lv_tags={'ceph.osd_id': args.osd_id, 'ceph.osd_fsid': args.osd_fsid}) + if args.osd_id and args.osd_fsid: + lvs.filter(lv_tags={'ceph.osd_id': args.osd_id, 'ceph.osd_fsid': args.osd_fsid}) + elif args.osd_fsid and not args.osd_id: + lvs.filter(lv_tags={'ceph.osd_fsid': args.osd_fsid}) if not lvs: raise RuntimeError('could not find osd.%s with fsid %s' % (args.osd_id, args.osd_fsid)) activate_filestore(lvs)