Skip to content

HashiCorp Raft Sidecar Operations

These commands help operators inspect the external HashiCorp Raft sidecar used with NOOS_CONSENSUS_MODE=raft and RAFT_ENGINE=hashicorp-go.

Build And Version

powershell
npm run noos -- raft-go build
npm run noos -- raft-go version

build compiles the sidecar binary. version reports the configured binary path and whether it exists.

Status

powershell
npm run noos -- raft-go status --json

Reads /node/observability/consensus and returns:

  • consensus mode
  • configured Raft engine
  • sidecar running/dead/restarting status
  • pid and uptime when available
  • restart count and last error
  • Raft leader/term/log indexes when available

Health

powershell
npm run noos -- raft-go health --json

Returns a compact ok verdict for automation.

Doctor

powershell
npm run noos -- raft-go doctor --json

Collects sidecar-focused diagnostic checks and fix-plan entries.

Lifecycle Control

The current NOOSChain node API does not expose a direct forced sidecar start/stop/restart endpoint. The CLI therefore provides a dry-run manual recovery plan:

powershell
npm run noos -- raft-go restart --dry-run
npm run noos -- raft-go start --dry-run
npm run noos -- raft-go stop --dry-run

Actual lifecycle control should be performed through the NOOSChain process supervisor, operating-system service manager, or node restart procedure. The HashiCorp sidecar keeps Raft state in HASHICORP_GO_RAFT_DATA_DIR, so do not delete that directory unless you are intentionally resetting a development cluster.

Logs

powershell
npm run noos -- raft-go logs

The current node API does not stream sidecar logs. Use the process supervisor, NOOSChain node logs, or deployment log aggregation.

Audience-first NOOSChain documentation.