Feature #3635
closedrbd cli: call "udevadm settle" after use of add/remove kernel interface
0%
Description
The rbd command line interface creates mappings by sending
output to the /sys/bus/rbd/add file system entry, and removes
them (or attempts to) using /sys/bus/rbd/remove.
Each of these activates udev handling, and completion of that
is asynchronous with respect to the command that initiated it.
We found that the "udevadm settle" command does a very nice
job of waiting for the completion of udev activity following
the "rbd add" command.
So: this is a suggestion that we insert calls to "udevadm settle"
inside the command line interface so that when the prompt returns
to the user, the mapping is either completely set up or completely
destroyed (for add and remove, respectively).
I suggested in e-mail; Josh said there might be reasons to not
wait: if we want to map a bunch of images at once and wait for
all of them with one "udevadm settle" command. Sage suggested
adding a "--no-udevadm-settle" flag to handle that case.
Updated by Dan Mick over 11 years ago
Trivial change. Biggest decision is which libc routine to use to spawn the command...
Updated by Sage Weil over 11 years ago
- Translation missing: en.field_position set to 4
Updated by Dan Mick over 11 years ago
- Status changed from In Progress to Resolved
Updated by Dan Mick over 11 years ago
commit:15bb00cafc31305cacf3c4684a429c2c9ee6f804 in master