]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix lvm activate arguments 43014/head
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 26 Aug 2021 21:11:12 +0000 (17:11 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Wed, 1 Sep 2021 20:33:01 +0000 (16:33 -0400)
commitb77ed5f99d3cb14a46bb36bb74e4136c22edf48a
treed7cf9cbacca74a95dc3ee05e7a2dd22cb8ae2bc5
parentf51c0c737e44e340b1057e2eae1cb6eccf299fea
ceph-volume: fix lvm activate arguments

When using the `lvm activate` subcommand without any osd ID or osd FSID
then ceph-volume fails.

Currently we can either activate with:
 - both osd ID and osd FSID
 - only the osd FSID (because it's unique)

The remaining scenarios aren't covered and generate a stack trace:
 - only the osd ID
 - no osd ID nor osd FSID

This ends up with an error like:

-->  UnboundLocalError: local variable 'tags' referenced before assignment

Fixes: https://tracker.ceph.com/issues/50665
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/activate.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_activate.py