New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not udevadm trigger, ceph-disk does it #365
Conversation
There is no need for osd create to call udevadm trigger action=add. By running all actions associated with add for all block devices, it may also trigger some race conditions. For instance, the following happens about 10% of the time, when using dmcrypt: * ceph-disk prepare --dmcrypt /dev/vdb * /dev/vdb1 starts activating via udev * ceph-deploy triggers action=add * /dev/vdb2 udev chown root /dev/vdb2 * /dev/vdb1 activate fails because of permission denied on /dev/vdb2 * /dev/vdb2 udev action chown ceph /dev/vdb2 http://tracker.ceph.com/issues/13299 Fixes: #13299 Signed-off-by: Loic Dachary <loic@dachary.org>
Refer to this link for build results (access rights to CI server needed): |
Nice catch! Can you retarget this at infernalis branch? Which udev rule is doing the root chown? Is that anything that is in our control? It seems like we avoid the situation most of the time now but the possibliity is always there that we'll get unlucky... |
in any case, Reviewed-by: |
It is my understanding that when a udev rule starts, it chown root (or recreate the file maybe, with default owner ?) and then the chown happens shortly afterwards but that leaves a window of opportunity. |
Perhaps the "fix" is to not blindly trigger events on all devices, but only on the specific device that changes? |
do not udevadm trigger, ceph-disk does it Reviewed-by: Sage Weil <sage@redhat.com>
When looking at some of the Glad to see this cleanup! Thanks a bunch. |
I think that's what ceph-disk does now. |
It always did the necessary udevadm / partprobe. The bugs were when it did too many and it created race conditions. For instance calling partprobe actually removes devices before adding them again. I let you imagine what that can do to an ongoing osd activation :-) |
There is no need for osd create to call udevadm trigger action=add. By
running all actions associated with add for all block devices, it may
also trigger some race conditions. For instance, the following happens
about 10% of the time, when using dmcrypt:
http://tracker.ceph.com/issues/13299 Fixes: #13299
Signed-off-by: Loic Dachary loic@dachary.org