Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ services:
retries: 30
seaweedfs:
<<: *restart_policy
image: "chrislusf/seaweedfs:4.09_large_disk"
image: "chrislusf/seaweedfs:4.17_large_disk"
entrypoint: "weed"
command: >-
server
Expand Down Expand Up @@ -292,6 +292,22 @@ services:
timeout: 20s
retries: 5
start_period: 60s
seaweedfs-admin:
<<: *restart_policy
image: "chrislusf/seaweedfs:4.17_large_disk"
entrypoint: "weed"
command: >-
admin
-port=23646
-master=seaweedfs:9333
Comment thread
cursor[bot] marked this conversation as resolved.
seaweedfs-worker:
<<: *restart_policy
image: "chrislusf/seaweedfs:4.17_large_disk"
entrypoint: "weed"
command: >-
worker
-admin=seaweedfs-admin:23646
-jobType=all

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Worker flag -jobType likely incorrect, should be -capabilities

High Severity

The seaweedfs-worker service uses -jobType=all, but all SeaweedFS documentation and issue trackers reference -capabilities as the correct flag for the weed worker command (accepting values like "vacuum,ec,balance"). If -jobType is an unrecognized flag, the Go binary will exit immediately on startup and the container will crash-loop, meaning cleanup tasks (the entire purpose of this PR) will never run.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is the correct flag. See the help command:

$ docker run chrislusf/seaweedfs:4.17_large_disk worker --help

Example: weed worker -admin=<admin_server> [-id=<worker_id>] [-jobType=all] [-workingDir=<path>] [-heartbeat=15s] [-reconnect=5s] [-maxDetect=1] [-maxExecute=4] [-metricsPort=<port>] [-metricsIp=<ip>] [-debug]
Default Usage:
  -address string
        worker address advertised to admin
  -admin string
        admin server address (default "localhost:23646")
  -debug
        serves runtime profiling data via pprof on the port specified by -debug.port
  -debug.port int
        http port for debugging (default 6060)
  -heartbeat duration
        heartbeat interval (default 15s)
  -id string
        worker ID (auto-generated when empty)
  -jobType string
        job types or categories to serve: all, default, heavy, or explicit names/aliases such as ec, balance, iceberg (comma-separated) (default "all")
  -maxDetect int
        max concurrent detection requests (default 1)
  -maxExecute int
        max concurrent execute requests (default 4)
  -metricsIp string
        Prometheus metrics listen IP (default "0.0.0.0")
  -metricsPort int
        Prometheus metrics listen port
  -options string
        a file of command line options, each line in optionName=optionValue format
  -reconnect duration
        reconnect delay (default 5s)
  -workingDir string
        working directory for persistent worker state
Description:
  Start an external plugin worker using weed/pb/plugin.proto over gRPC.

This command provides plugin job type handlers for cluster maintenance,
including descriptor delivery, heartbeat/load reporting, detection, and execution.

Behavior:
  - Use -jobType to choose handlers by category or explicit name (comma-separated)
  - Categories: "all" (every registered handler), "default" (lightweight jobs),
    "heavy" (resource-intensive jobs like erasure coding)
  - Explicit job type names and aliases are still supported (e.g. "vacuum", "ec")
  - Categories and explicit names can be mixed (e.g. "default,iceberg")
  - Use -workingDir to persist worker.id for stable worker identity across restarts
  - Use -metricsPort/-metricsIp to expose /health, /ready, and /metrics

Examples:
  weed worker -admin=localhost:23646
  weed worker -admin=localhost:23646 -jobType=all
  weed worker -admin=localhost:23646 -jobType=default
  weed worker -admin=localhost:23646 -jobType=heavy
  weed worker -admin=localhost:23646 -jobType=default,iceberg
  weed worker -admin=localhost:23646 -jobType=vacuum,volume_balance
  weed worker -admin=localhost:23646 -jobType=erasure_coding
  weed worker -admin=admin.example.com:23646 -id=plugin-vacuum-a -heartbeat=10s
  weed worker -admin=localhost:23646 -workingDir=/var/lib/seaweedfs-plugin
  weed worker -admin=localhost:23646 -metricsPort=9327 -metricsIp=0.0.0.0

snuba-api:
<<: *snuba_defaults
healthcheck:
Expand Down
Loading