]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-wnbd: wait for disks to become available 53136/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 24 Aug 2023 11:41:01 +0000 (11:41 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 29 Aug 2023 09:59:22 +0000 (09:59 +0000)
commita48b8d90d96667482d0fd8a747f1f0280c4fc2f2
tree23a59c87183c12cd583356a6f0213b0936ba855d
parent28a78fa1690ce43bd225de79b7a229b739b02bdd
rbd-wnbd: wait for disks to become available

After a WNBD mapping is created, the driver informs Storport that
the bus changed, expecting it to rescan the bus and expose the disk.
This is an asynchronous process and it usually takes a matter of
milliseconds, up to a few seconds under significant load.

The fsx librbd test ocasionally fails to open the disk as it isn't
ready yet. Unlike the Python rbd-wnbd test, it doesn't perform
any polling.

For convenience, WNBD now includes a helper function called
WnbdPollDiskNumber. We're going to use it to wait for the new
disk attachments to become available.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/tools/rbd_wnbd/rbd_wnbd.cc
src/tools/rbd_wnbd/rbd_wnbd.h