]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: filter by osd-id or osd-fsid when zapping 35878/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 20 Jul 2020 13:43:38 +0000 (15:43 +0200)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 4 Aug 2020 20:05:30 +0000 (15:05 -0500)
commit7ecf8c9bfc87e4caf4cd74f5744a21e229bbef4f
tree5ca496a82eaae426adb0220423d3c005c6ff51f3
parent6835531badb91fd91d6df378a36ed9d9f641ea16
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