mirror of
https://github.com/ceph/ceph
synced 2025-03-07 08:49:15 +00:00
get_partition_dev() is a function called to get a block device path. The @retry decorator implements a timeout mecanism as it exist a race between the partition creation command and the actual presence of the partition. This function have a semantic issue. The function is asked if /dev/sda6 exists but check if /sys/block/sda/sda6 exists. Once /sys/block/sda/sda6 is populated within the timeout, the function returns "/dev/sda6". But this doesn't check if "/dev/sda6" really exists, so a function using this value fall into a race condition and fails too. We do have this case inside the CI where timing are very variable regarding the workload and VM's performance and even sometimes nasted VMs. This patch offer to double-check before returning that the actual /dev/ entry actually exist once the BLOCKDIR (/sys) is populated. If not, the @retry is triggered to let some time resolution this temporary situation. If this state is permanent, an explicit error message is reported like : /dev/sdb1 is not populated while /sys/block/sdb has it Signed-off-by: Erwan Velu <erwan@redhat.com> |
||
---|---|---|
.. | ||
ceph_disk | ||
tests | ||
.gitignore | ||
AUTHORS.rst | ||
CMakeLists.txt | ||
MANIFEST.in | ||
README.rst | ||
requirements.txt | ||
run-tox.sh | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
ceph-disk ========= ceph-disk is a command line tool that manages Ceph OSD storage