]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: filter by osd-id or osd-fsid when zapping
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 20 Jul 2020 13:43:38 +0000 (15:43 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 27 Jul 2020 06:15:50 +0000 (08:15 +0200)
commite94aef6f96189648d0f204d8118501577dde5f52
tree23d810984dcfeacb99c508314a7d7b87eb4ee6ce
parent7ffa753be032a3c6da58fc268a56c79c090b4b9b
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>
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