]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: system.get_mounts() refactor 47536/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 9 Aug 2022 06:27:30 +0000 (08:27 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 17 Aug 2022 04:30:17 +0000 (06:30 +0200)
commit06b9c5a6d3821364e8201601ac4478f4a1e4d82d
tree0fbd2c31f2c34c6c7922dbb65efe11ac8540a156
parentab05de791703b8b7be991a422a55738d01035e52
ceph-volume: system.get_mounts() refactor

When a network mount is present in `/proc/mounts` but for any reason
the corresponding server is down, this function hangs forever.
In a cluster deployed with cephadm, the consequence is that
it triggers `ceph-volume inventory` commands that hang and stay in D
state.

The idea here is to use a thread with a timeout to abort the call if the
timeout is reached.
`get_mounts()` is now a method of a class so we can exclude a path
altogether during the whole `inventory` execution (otherwise,
ceph-volume would try to access it as many devices there is on the
host which could slow down the inventory execution)

Fixes: https://tracker.ceph.com/issues/57070
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 89cad1f33b30bf9237734ee3595eb000facfc7d8)
src/ceph-volume/ceph_volume/devices/simple/scan.py
src/ceph-volume/ceph_volume/tests/util/test_system.py
src/ceph-volume/ceph_volume/util/encryption.py
src/ceph-volume/ceph_volume/util/system.py