]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: filter by osd-id or osd-fsid when zapping 35900/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 20 Jul 2020 13:43:38 +0000 (15:43 +0200)
committerRishabh Dave <ridave@redhat.com>
Mon, 10 Aug 2020 08:18:42 +0000 (13:48 +0530)
commit49a3ad8108a3d732fcc420192777b9a8cdc6100a
treefc0dd3e2284d14e8aafb0f9e808d8d942c39df8c
parent72bd7324a00075e42e30691069372b5d33f9d6ad
ceph-volume: filter by osd-id or osd-fsid when zapping

2f5c10c12c37e6865ce54bb4940d3779353cba4f introduced a bug:

`ceph-volume lvm zap` command fails under certain conditions.

when passing `--osd-id` or `--osd-fsid` to `ceph-volume lvm zap` command
it tries to zap additionnal devices that have nothing to do with the osd
being zapped.

When calling `api.get_lvs()` in `ensure_associated_lvs()` we have to
pass the osd-id/osd-fsid information so only related devices are
returned by `get_lvs()` method

Closes: https://tracker.ceph.com/issues/46627
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e94aef6f96189648d0f204d8118501577dde5f52)
src/ceph-volume/ceph_volume/devices/lvm/zap.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_zap.py
src/ceph-volume/ceph_volume/util/__init__.py