ceph/src/ceph-disk
Erwan Velu d501c7b33a ceph-disk: get_partition_dev() should fail until get_dev_path(partname) is populated
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>
2018-05-09 16:33:51 +02:00
..
ceph_disk ceph-disk: get_partition_dev() should fail until get_dev_path(partname) is populated 2018-05-09 16:33:51 +02:00
tests ceph-disk/tests: simplify CEPH_LIB hack 2018-03-06 14:44:49 -06:00
.gitignore
AUTHORS.rst
CMakeLists.txt src: s/--use-wheel// 2018-04-01 21:01:39 +08:00
MANIFEST.in
README.rst
requirements.txt
run-tox.sh
setup.py
test-requirements.txt
tox.ini src: s/--use-wheel// 2018-04-01 21:01:39 +08:00

ceph-disk
=========

ceph-disk is a command line tool that manages Ceph OSD storage