Project

General

Profile

Feature #3635

rbd cli: call "udevadm settle" after use of add/remove kernel interface

Added by Alex Elder over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

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.

Associated revisions

Revision 15bb00ca (diff)
Added by Dan Mick about 11 years ago

rbd: call udevadm settle on map/unmap

When we map/unmap devices, udev gets called to manage device nodes;
this will allow the command to wait for those manipulations to complete,
particularly for test runs, so that the device tree is stable by the
time the command exits.

--no-settle is also provided to avoid this behavior if desired (say,
for a series of 'map' commands, perhaps the user wants to wait for
settling only on the last of the series).

Fixes: #3635
Signed-off-by: Dan Mick <>
Reviewed-by: Alex Elder <>

History

#1 Updated by Dan Mick over 11 years ago

Trivial change. Biggest decision is which libc routine to use to spawn the command...

#2 Updated by Ian Colle over 11 years ago

  • Assignee set to Dan Mick

#3 Updated by Sage Weil about 11 years ago

  • Project changed from Ceph to rbd

#4 Updated by Sage Weil about 11 years ago

  • translation missing: en.field_position set to 4

#5 Updated by Dan Mick about 11 years ago

  • Status changed from New to 12

#6 Updated by Dan Mick about 11 years ago

  • Status changed from 12 to In Progress

#7 Updated by Dan Mick about 11 years ago

  • Status changed from In Progress to Resolved

#8 Updated by Dan Mick about 11 years ago

commit:15bb00cafc31305cacf3c4684a429c2c9ee6f804 in master

Also available in: Atom PDF