Repository navigation
reef: RBD backports (batch 2) - #51518
Merged
Merged
Conversation
…y creating a new one Problem: ------- At a high level, creating a primary snapshot consists of three steps: 1. actually creating a snapshot in the mirror namespace 2. generating a set of image state objects with additional metadata for the snapshot 3. marking the snapshot as complete after the image state objects are written out Depending on the circumstances, a request to create a primary snapshot can be forwarded to rbd-mirror daemon. If that happens and rbd-mirror daemon gets axed for some practical reason after completing steps (1) and/or (2) but before completing step (3), we are left with a permanently incomplete primary snapshot because upon retrying that primary snapshot creation request, librbd notices that such snapshot already exists. It does not check whether this "pre-existing" snapshot is complete. Solution: -------- As part of the next mirror snapshot create (say triggered by the scheduler) the unlink_peer() is called, it checks if there exists any incomplete snapshot and delete them accordingly. Fixes: https://tracker.ceph.com/issues/58887 Signed-off-by: Prasanna Kumar Kalever <[email protected]> (cherry picked from commit 165c9a4)
Up until now this was conditioned on whether the caller expressed interest in the ID of the created snapshot and happened to work only because CreatePrimaryRequest wasn't actually consulting any mirror snapshot metadata. This has just changed with unlink_peer() needing to see an up-to-date complete flag which is set in SetImageStateRequest following the write out of image state object(s). Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit df2bb13)
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]> (cherry picked from commit ac552c9)
The use of SUCCEED macro predates the introduction of GTEST_SKIP macro to GTest 1.10. Having skipped tests reported as passed is misleading! Before: [ RUN ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild SKIPPING [ OK ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms) ... [ RUN ] TestMockOperationSnapshotRemoveRequest.RemoveChildError SKIPPING [ OK ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (112 ms) ... [ PASSED ] 16 tests. After: [ RUN ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild ../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:381: Skipped Skipping due to unmet REQUIRE [ SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms) ... [ RUN ] TestMockOperationSnapshotRemoveRequest.RemoveChildError ../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:727: Skipped Skipping due to enabled deep-flatten [ SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (111 ms) ... [ PASSED ] 14 tests. [ SKIPPED ] 2 tests, listed below: [ SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild [ SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit 472c7b6)
... requests to be completed. Signed-off-by: Ramana Raja <[email protected]> (cherry picked from commit 38a7e37)
Signed-off-by: Ramana Raja <[email protected]> (cherry picked from commit e452899)
In certain scenarios the OSDs were slow to process RBD requests. This lead to the rbd_support module's RBD client not being able to gracefully handover a RBD exclusive lock to another RBD client. After the condition persisted for some time, the other RBD client forcefully acquired the lock by blocklisting the rbd_support module's RBD client, and consequently blocklisted the module's RADOS client. The rbd_support module stopped working. To recover the module, the entire mgr service had to be restarted which reloaded other mgr modules. Instead of recovering the rbd_support module from client blocklisting by being disruptive to other mgr modules, recover the module automatically without restarting the mgr serivce. On client getting blocklisted, shutdown the module's handlers and blocklisted client, create a new rados client for the module, and start the new handlers. Fixes: https://tracker.ceph.com/issues/56724 Signed-off-by: Ramana Raja <[email protected]> (cherry picked from commit cc04687)
... after the module's RADOS client is blocklisted. Signed-off-by: Ramana Raja <[email protected]> (cherry picked from commit a2f15d4)
Recover from being blocklisted while recovering from blocklisting. When the rbd_support module is being set up to recover from client blocklisting, the module's new rados client connection can also get blocklisted. Currently, this will cause the recovery to fail and the module will remain inoperable. Instead, retry module recovery when the new client gets blocklisted during the module setup in the recovery thread. Fixes: https://tracker.ceph.com/issues/59713 Signed-off-by: Ramana Raja <[email protected]> (cherry picked from commit 4523d9b)
See: `m_locker->address = iter->second.addr.get_legacy_str();` In the case where `iter->second.addr` is an empty address, m_locker->address string is assigned with "0)/0" and therfore will never result in an empty string. Use `is_blank_ip()` before `get_legacy_str()` Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 7482bee)
Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit 43f2e4a)
Currently: 2023-04-28T12:20:17.135+0530 7f1a7ccd2640 20 librbd::ExclusiveLock: 0x7f1a4c000b60 block_requestsr=0 [...] 2023-04-28T12:20:17.135+0530 7f1a7ccd2640 20 librbd::ManagedLock: 0x7f1a4c000b78 is_lock_owner: =1 [...] 2023-04-18T21:18:50.695+0530 7f0a1ffff640 20 librbd::ImageWatcher: 0x7f0a10007840 remote async request finished: [4305,140018014309120,1] = -110 Signed-off-by: Prasanna Kumar Kalever <[email protected]> (cherry picked from commit e558ec5)
Contributor
Author
|
Added #51279 |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #49742, #50324, #51166, #51264, #51279, #51297 and #51454 to reef.