Repository navigation
test(ceph): stop the control daemon verify test racing its timeout - #975
Open
abrahamperz wants to merge 1 commit into
Open
abrahamperz wants to merge 1 commit into
abrahamperz wants to merge 1 commit into
Conversation
TestVerifyControlDaemonAbsentReturnsOnceAbsent only reports the daemon absent on the third presence poll, but it ran inside the 30ms verification window shared with the timeout tests. On a loaded host the 5ms poll timers fire late, two waits overrun the window and the verify loop gives up after the second poll, failing the test. Give this test a 10s window. It does not exercise the timeout and the loop still returns on the third poll, so it stays fast, while the timeout tests keep the 30ms window. Assisted-by: claude-code:claude-opus-5-5 Signed-off-by: Abraham Perez <abraham1798@gmail.com>
abrahamperz
force-pushed
the
abrahamperz/test-control-daemon-verify-flake
branch
from
November 26, 2026 05:51
dcb2537 to
8bdebf1
Compare
abrahamperz
marked this pull request as ready for review
November 26, 2026 05:51
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.
Description
TestVerifyControlDaemonAbsentReturnsOnceAbsentinmicroceph/ceph/control_removal_test.gofails intermittently on loaded hosts. The test reports the daemon absent only on the third presence poll, but it runs inside the shrunken verification window shared with the timeout tests (30ms timeout, 5ms poll interval). When the 5ms poll timers fire late, two waits overrun the 30ms window,verifyControlDaemonAbsentreturns after the second poll, and the test fails withexpected: 3, actual: 2.I gave this one test a 10s verification window while keeping the 5ms poll interval. The test does not exercise the timeout path, and the loop still returns as soon as the third poll reports the daemon absent, so the test stays as fast as before. The tests that do exercise the timeout keep the 30ms window. No production code changes.
Fixes #773
Type of change
How has this been tested?
I reproduced the flake on
mainby running the test binary withGOMAXPROCS=1while eight busy loops kept the CPU saturated:-test.run TestVerifyControlDaemonAbsentReturnsOnceAbsent -test.count=300failed 10 of 300 runs withexpected: 3, actual: 2.With this change, the same setup running every
TestVerifyControlDaemonAbsent*,TestEnsureMgrAbsent*andTestEnsureMdsAbsent*test 300 times passed every run. I also rango build ./...,go vet ./...andgo test ./...frommicroceph/, all passing, andgofmt -lreports nothing.Contributor checklist
Please check that you have: