Skip to content

Commit

Permalink
ceph-volume lvm.activate allow not using osd_id
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <[email protected]>
  • Loading branch information
Alfredo Deza committed Sep 11, 2017
1 parent 8d1a1a8 commit 99a8a71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ceph-volume/ceph_volume/devices/lvm/activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def __init__(self, argv):
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)
Expand Down

0 comments on commit 99a8a71

Please sign in to comment.