Repository navigation
os/bluestore: Support flock retry - #34566
Conversation
|
@X0Ken - it would be nice to have a rationale for this fix attached to the commit. |
|
@X0Ken ping? |
|
2020-04-16T21:11:35.389+0800 7f7e712d2bc0 -1 bluestore(/root/ceph/build/dev/osd2/block) _read_bdev_label failed to open /root/ceph/build/dev/osd2/block: (2) No such fil |
|
The systemd-dbus read device causes the osd fail to lock, try again here |
|
@X0Ken - I think this PR makes sense - I'm able to repro the issue and fix it with your patch. |
There was a problem hiding this comment.
May be make this default a bit higher, e.g. 1 sec?
There was a problem hiding this comment.
In my test, 0.1 seconds is enough, I don’t know how it is on your side.
nh2
left a comment
There was a problem hiding this comment.
This change just retries on the lock.
Please add an explanation why this is the correct thing to do.
In https://tracker.ceph.com/issues/46124 I do a detailed system call analysis and from that it isn't even clear why the problem arises (why EAGAIN occurs at all, given the access pattern). Further, it is unclear whether or not there should be contention.
Separately, if contention is expected, does it make sense to bound the number of retries to 3, or is it arbitrary? That seems like it would sometimes work, and sometimes not.
I would like to understand whether this is intended a proper fix of the underlying problem, or a "well just try 3 times to make my cluster work" workaround.
The answer to that should be as a comment in the code, and if it's just a workaround, it should says so explicitly, so that it's clear that https://tracker.ceph.com/issues/46124 should be kept open untlil the underlying problem is fixed. It should then also say that the added settings bdev_flock_retry_interval and bdev_flock_retry are temporary knobs likely to be removed in the future when the underlying problem is fixed.
(Just to be clear, I appreciate even a workaround like this for now, given that the bug blocks me from upgrading beyond Ceph 13, but the code should be clear on the workaround vs fix question.)
There was a problem hiding this comment.
Why this correct, don't you need to save the errno value explicilty?
Unless I'm mistaken, derr << may reset the errno to some other value.
When the block changes, systemd-udevd will open the block, read some information and close it. Then a failure occurs here. So we need to try again here. Fixes: https://tracker.ceph.com/issues/46124 Signed-off-by: wanghongxu <[email protected]>
@tchaikov From what I can tell, this was not addressed, but the PR was merged anyway. Is that correct? Also, there was no discussion on whether this is now a real fix or a probabilistic workaround (#34566 (review)), and to me, just trying 3 times, is not a real fix. Yet the bug https://tracker.ceph.com/issues/46124 asking for a real fix was auto-closed by this PR. |
|
@nh2 hi Niklas, i agree with you. that comment was not addressed. and this is not desired.
hmm, this does not sound right to me. @ifed01 , Igor, what do you think? i will try to read your analysis tomorrow to understand this issue better. also i reopened https://tracker.ceph.com/issues/46124, just to make sure we get this issue addressed instead of get it covered. |
bluestore: Support flock retry
When the block changes, systemd-udevd will open the block,
read some information and close it. Then a failure occurs here.
So we need to try again here.
Fixes: https://tracker.ceph.com/issues/46124
Signed-off-by: wanghongxu [email protected]
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox