Skip to content

fix(seaweedfs): accept gRPC port suffix in master role probe - #3506

Merged
ldming merged 1 commit into
release-1.0from
fix/seaweedfs-master-grpc-role-v2
Sep 20, 2026
Merged

ldming merged 1 commit into
release-1.0from
fix/seaweedfs-master-grpc-role-v2

Conversation

@weicao

@weicao weicao commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Problem

SeaweedFS 4.47 can serialize the master Leader address as host:9333.19333, where the suffix is the optional gRPC port. The existing role probe only accepted addresses ending in :9333, so a healthy elected master could be reported as unknown.

Change

  • Accept host:9333 and host:9333.<grpcPort> addresses.
  • Keep follower handling when IsLeader is omitted or false.
  • Return unknown for malformed or non-numeric suffixes.
  • Add offline regression coverage for leader, follower, optional gRPC suffix, and invalid addresses.

This PR is based on the current release-1.0 head 0d53cfe and supersedes the conflicting #3494 branch. The filer static-template fix is already present through merged PR #3493; this PR contains only the master role-probe fix and its tests.

Validation

  • python3 -m unittest addons/seaweedfs/tests/test_scripts.py — 12/12
  • KB_CRD_DIR=.../repos/kubeblocks/config/crd/bases python3 -m unittest addons/seaweedfs/tests/test_charts.py — 10/10
  • shellspec --load-path ./shellspec --default-path addons/seaweedfs/scripts-ut-spec --shell bash — 1/1
  • ShellCheck — passed
  • Helm lint for addons/seaweedfs and addons-cluster/seaweedfs after local dependency build — passed
  • git diff --check — passed

Tested commit: e8f918d52a71da7198d406c110ce2f67db82f856.

@weicao
weicao requested review from a team and leon-ape as code owners September 20, 2026 08:22
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (0d53cfe) to head (e8f918d).

Additional details and impacted files
@@             Coverage Diff             @@
##           release-1.0   #3506   +/-   ##
===========================================
  Coverage         0.00%   0.00%           
===========================================
  Files               72      72           
  Lines             7669    7669           
===========================================
  Misses            7669    7669           

☔ 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.

@ldming
ldming merged commit 5821556 into release-1.0 Sep 20, 2026
14 checks passed
@ldming
ldming deleted the fix/seaweedfs-master-grpc-role-v2 branch September 20, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants