Skip to content

fix(mariadb): remove silent-no-op Galera memberLeave action#3055

Draft
weicao wants to merge 1 commit into
mainfrom
fix/mariadb-galera-memberleave
Draft

fix(mariadb): remove silent-no-op Galera memberLeave action#3055
weicao wants to merge 1 commit into
mainfrom
fix/mariadb-galera-memberleave

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #3053 — the Galera memberLeave ran in kbagent (no mariadb client), so its FLUSH/desync SQL was a swallowed no-op.

Rationale for removal (not exec.image) in the issue: Galera auto-evicts departed nodes, and the shutdown graceful-leave is already done by the in-container preStop (wsrep_on=OFF subsumes wsrep_desync=ON). Change: remove action + script mount + script; add contract spec.

Validation: helm renders (no memberLeave / no galera-member-leave.sh refs), full mariadb shellspec green (656 examples, 0 failures, 9 pre-existing pendings). mariadb team full-suite verification per westonnnn.

The Galera memberLeave ran galera-member-leave.sh in the kbagent
execution face (container: mariadb, no exec.image), which has no mariadb
client, and every SQL was guarded with 2>/dev/null || true — so the
claimed FLUSH TABLES / wsrep_desync=ON never executed and it exited 0. It
also never checked KB_LEAVE_MEMBER_POD_NAME.

Removal is the correct fix: Galera evicts a departed node natively via
keepalive timeout, and the shutdown-time graceful leave (final seqno +
safe_to_bootstrap, clean InnoDB flush) is already handled by the mariadb
container preStop running in-container against 127.0.0.1 — wsrep_on=OFF
subsumes wsrep_desync=ON. Making the action work via exec.image would
only duplicate preStop with a new failure surface.

Remove the memberLeave action, the script mount, and the script; add a
contract spec. helm renders; full mariadb suite green (656 examples).

Fixes #3053
@weicao weicao requested review from a team and leon-ape as code owners July 6, 2026 08:56
@weicao weicao added the nopick Not auto cherry-pick when PR merged label Jul 6, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (893f230) to head (47dacf0).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...scripts-ut-spec/galera_memberleave_removed_spec.sh 0.00% 35 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3055   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        142     143    +1     
  Lines      22841   22876   +35     
=====================================
- Misses     22841   22876   +35     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leon-ape leon-ape left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weicao weicao marked this pull request as draft July 6, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mariadb: Galera memberLeave is a silent no-op (runs in kbagent without a client); remove it — preStop already handles graceful leave

3 participants