Repository navigation
fix(image): the takeover proof waits for its target and takes back what a failed proof left - #41
Merged
Merged
Conversation
…at a failed proof left Three defects of spdk-takeover-proof, met on a node: - A disk's start or recovery right after ublk_create_target can answer -EAGAIN: the poll groups set up their buffers on their own threads after the target answered (0058). The return phase took that not-yet for a verdict. Starts and recoveries now wait up to 10 s while the target answers -EAGAIN. - A failed phase stopped only the disks its process served. Those it had left to the kernel stayed quiesced, holding the proof's ids. It now takes them back and stops them too, best effort. - The clean phase took back a leftover disk over a 64 MiB null bdev. The recovery refuses a bdev of another size than the disk's (0070), so since 0070 the clean could not clean anything, and said "another process serves it". It now uses a bdev of the disk's size, read from /sys/block/ublkb<id>/size (the proof's lvol size if unreadable). ublk-functional.sh adds the case: a disk the create phase left to the kernel is taken back and stopped by the next clean.
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.
spdk-takeover-proofhad three defects, met on a node in a rolling upgrade. One of them held that node out of every upgrade until someone stepped in by hand.ublk_create_targetcan answer-EAGAIN, because the poll groups set up their buffers on their own threads after the target answered (0058). The return phase took that for a failure. Starts and recoveries now wait up to 10 s while the target answers-EAGAIN./sys/block/ublkb<id>/size, or the proof's lvol size if unreadable.ublk-functional.shadds the case: a disk the create phase left to the kernel is taken back and stopped by the next clean.Not changed:
ublk_create_targetstill answers before its poll groups are ready, and starts and recoveries still answer-EAGAINuntil then (0058's contract). Making the target's creation wait would turn the RPC asynchronous across the later ublk patches. The callers that start disks long after the target's creation never meet the window, and the proof now waits for it.Test:
ublk-functional.sh(the proof's phases against this image, then the leftover case). The tool builds with-Wall -Wextra -Werror.