]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix raw activate when device path is stale 69410/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 10 Jun 2026 11:22:14 +0000 (13:22 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 11 Jun 2026 07:37:10 +0000 (07:37 +0000)
commitd942043cc56d213dde2c2571cbcc81d37efe2d6b
tree4f3419caf866e078543435fb7842bc969879a1a9
parent602efe1b0e01d593902b204ac682f5b5b99b2453
ceph-volume: fix raw activate when device path is stale

This changes unlink_bs_symlinks to use os.path.lexists instead
of os.path.exists. It can happen that devices get renumbered,
in that case, the OSD symlink still exists but its target device
is gone which means os.path.exists returns False, so the symlink
is never cleaned up and ceph-volume activate can fail later.

Fixes: https://tracker.ceph.com/issues/77295
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 1ee1fc14fe16aee940293ec228107e8c5a68c2d8)
src/ceph-volume/ceph_volume/objectstore/baseobjectstore.py
src/ceph-volume/ceph_volume/tests/objectstore/test_raw.py