hashgraph / hashgraph/solo-weaver

feat(daemon): add POST /probe/recheck endpoint and daemon service recheck command

Open
#668 1 comment 0 reactions 1 assignee Claimed by @leninmehedy View on GitHub
Feature Enhancement
Dominant language
Go
Stars
3
Forks
0
Avg merge
3d 2h
Merged PRs (30d)
46

Description

## Summary

The background probe loop retries disk prerequisite checks every 30 seconds. After an operator fixes permissions (e.g. \`chown hedera:hedera\` on the upgrade directory), they must wait up to 30s for the next probe round to confirm the fix — with no way to trigger an immediate recheck.

## Proposed solution

- Add \`POST /probe/recheck\` to the daemon HTTP API. The endpoint signals the background goroutine via a channel to run a probe round immediately, then returns \`202 Accepted\`. The caller can poll \`GET /status\` (checking \`probe_errors\`) to see the result.
- Add \`solo-provisioner daemon service recheck\` CLI command that hits \`POST /probe/recheck\` and then polls \`GET /status\` until \`probe_errors\` is empty or a timeout is reached, printing a pass/fail result.

## Design notes

- The signal channel should be non-blocking (buffered size 1) so multiple rapid calls collapse into a single probe round.
- The background loop in \`runComponentProbes\` replaces \`time.After(componentProbeInterval)\` with a \`select\` on both the timer and the signal channel.
- The HTTP handler should be registered as \`POST /probe/recheck\` and gated to the daemon socket (already non-routable from outside the host).

## Current workaround

Restart the daemon to trigger an immediate probe round:

\`\`\`bash
sudo systemctl restart solo-provisioner-daemon
\`\`\`

This works but is heavier than needed — it restarts all monitors and re-runs the kubeconfig preflight.

## Scope

- [ ] Signal channel wired into \`runComponentProbes\`
- [ ] \`POST /probe/recheck\` handler in \`server.go\`
- [ ] \`daemon service recheck\` CLI command
- [ ] Unit test: signal channel collapses rapid calls
- [ ] UAT: fix permissions, run \`daemon service recheck\`, confirm immediate pass

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.