Repository navigation
librbd: localize snap_remove op for mirror snapshots - #51166
Conversation
trociny
left a comment
There was a problem hiding this comment.
I am not sure I agree with the approach. To me it looks like we are just hiding the real problem (transfering an operation from a lock owner that does not support it may not work) instead of fixing it. And we may step on it in some other place.
I wouldn't deny that there is a bit of that here ;) But, at a high level, I think the approach is sound. Even if all clients out there in the field supported all operations, it would still be entirely possible for rbd-mirror daemon on the secondary cluster to end up owning the lock on the primary image and perform operations such as primary mirror snapshot creation and removal on primary cluster's behalf. Architecturally this doesn't make sense to me: I don't see why rbd-mirror daemon on the secondary cluster should ever hold the exclusive lock/perform any operation that requires the exclusive lock on the primary image (and vice versa).
Yeah, the fundamental issue with exclusive lock transfers is that the lock is not actually transferred. When the lock requested by a peer, the lock owner just releases it. Any peer, not necessarily the requestor, is able to grab it -- and, in the presence of uneven network latency between clients, the original lock owner just ends up grabbing it back. There is no provision for fairness in the protocol. The kernel client does try to go easier in its implementation: but I don't think librbd has something similar. And, regardless, this wouldn't cover a two order of magnitude difference in network latency between local and cross-AZ traffic, which is what we are going to be contending with in snapshot-based mirroring scenarios. |
|
Fair enough. Although I still don't like it I can't think of anything better that wouldn't require changes on the client (kernel/librbd) side, which might be troublesome. |
If you have ideas around introducing some notion of fairness to the exclusive lock or perhaps actual peer-to-peer transfers, I would be interested in hearing them! I consider this PR to be a bug fix for snapshot-based mirroring (almost unrelated to the exclusive lock behavior and more to do with making the secondary cluster touch the primary cluster as little as possible) but we may need to tackle the exclusive lock problem in the future. |
We could add a flag to Not sure it is a very nice approach and how easy it would be to implement, still it seems it could work. And it could be used only for specific cases like this (i.e. when the current lock owner does not support an OP). |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
35ab217 to
6d76e0f
Compare
6d76e0f to
3a94356
Compare
ea55ab8 to
f867f7a
Compare
f867f7a to
a0a2e4c
Compare
a0a2e4c to
b94f264
Compare
|
jenkins test make check |
|
jenkins test windows |
|
|
A client may attempt a lock request not quickly enough to obtain exclusive lock for operations when another competing client responds quicker. This can happen when a peer site has different performance characteristics or latency. Instead of relying on this unpredictable behavior, localize operation to primary cluster. Fixes: https://tracker.ceph.com/issues/59393 Signed-off-by: Christopher Hoffman <[email protected]>
b94f264 to
ac552c9
Compare
|
No related failures: https://pulpito.ceph.com/dis-2023-05-08_22:48:48-rbd-wip-dis-testing-distro-default-smithi/ This is with #49975 excluded in the last rerun -- it's causing "Exiting scrub checking -- not all pgs scrubbed." errors. Per @neha-ojha the plan is to introduce a more aggressive QoS profile for teuthology tests. |
A client may attempt a lock request not quickly enough to obtain exclusive lock for operations when another competing client responds quicker. This can happen when a peer site has different performance characteristics or latency. Instead of relying on this unpredictable behavior, localize operation to primary cluster.
Fixes: https://tracker.ceph.com/issues/59393
Signed-off-by: Christopher Hoffman [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
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 cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows