]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
krbd: retry on an empty list from udev_enumerate_scan_devices()
authorIlya Dryomov <idryomov@gmail.com>
Thu, 24 Oct 2019 15:35:23 +0000 (17:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Oct 2019 20:05:32 +0000 (22:05 +0200)
commitbd37a72e0ec783a1ba91e63e8d96f0bc06007060
tree6e44c879d3fa1f24f2c7a7e37159b3f29acba931
parente5921ef4a89f497a0bff6510fce0bb5c242d6172
krbd: retry on an empty list from udev_enumerate_scan_devices()

systemd 219 doesn't have the issue that is worked around in the
previous commit, but has a different one: udev_enumerate_scan_devices()
always succeeds, but sometimes returns an empty list when the device is
actually there.  This happens rarely and at random so I haven't been
able to get to the bottom of it yet, but it looks like another similar
race condition in libudev.

Since an empty list is expected if the device isn't there, retry just
twice with a small sleep in-between.  This appears to be enough: I got
7 occurrences per 600000 "rbd unmap" invocations, all of which needed
a single retry:

  rbd: udev enumerate missed a device, tries = 1

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/krbd.cc