Skip to content

feat(update): SIGUSR2 asks for an update check now - #60

Open
MorningLightMountain713 wants to merge 1 commit into
masterfrom
feat/update-check-now
Open

MorningLightMountain713 wants to merge 1 commit into
masterfrom
feat/update-check-now

Conversation

@MorningLightMountain713

@MorningLightMountain713 MorningLightMountain713 commented Nov 23, 2026 •

Copy link
Copy Markdown

An operator, or a test, can ask the watchdog for an update check now instead of waiting for its 1 to 4 hour schedule:

pm2 sendSignal SIGUSR2 watchdog

The signal only sets a flag. The job loop, which already runs every minute, runs auto_update() at its next pass when the flag is set or the schedule comes round, and clears the flag. So an asked-for check is the same check, in the same loop, and can never run at the same time as a scheduled one. The schedule's own count is unchanged.

  • update_request.js: the request and the "is an update due this pass" rule.
  • test/update_request.test.js: an asked-for check runs once at the next pass; two asks give one check; the schedule still runs when it comes round. With the rule changed to ignore the request, two of the three fail.
  • npm test 72 passed; npm run lint and npm run format:check clean.

Run on a legacy node under pm2 (2026-11-23): the watchdog at this branch, its flux source pointed at a lab apt repository, each case started from one snapshot of the node on flux 9.1.0 and fluxbench 6.3.1. Each check was asked for with pm2 sendSignal SIGUSR2 watchdog; the watchdog logged Update check asked for (SIGUSR2)…, then ran its check at the next pass of the job loop.

Repository offers Watchdog Node after
flux 9.2.0 without Depends: fluxbench apt-get install flux, one transaction: flux 9.1.0 → 9.2.0 fluxd does not answer, fluxbenchd not running
flux 9.2.0 with Depends: fluxbench (>= 6.5.0), fluxbench 6.3.1 Flux daemon … is not installed: apt cannot meet its dependencies: flux : Depends: fluxbench (>= 6.5.0) but 6.3.1 is to be installed; no transaction unchanged, fluxd still running
flux 9.2.0 and fluxbench 6.5.0, each depending on the other apt-get install flux fluxbench, one transaction: both upgraded fluxd 9.2.0 and fluxbenchd 6.5.0 answer, FluxOS answers

flux 9.2.0 is fluxd at 520784219 packaged as its release workflow packages it (deb_file control); fluxbench 6.5.0 is b4d0ba2d7.

🤖 Generated with Claude Code

… pass

pm2 sendSignal SIGUSR2 watchdog runs auto_update within a minute, in the same loop as the
scheduled checks, so the two never overlap. The 1 to 4 hour schedule goes on as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Cabecinha84

Copy link
Copy Markdown
Member

ACK. Reviewed the diff and checked out the branch: the flag-only SIGUSR2 handler plus the job loop pass keeps checks serialized and leaves the schedule untouched. CI green.

Non-blocking: nodes on Arcane run the watchdog under systemd, so the README could also mention systemctl kill -s SIGUSR2 flux-watchdog.

@Cabecinha84 Cabecinha84 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved. See the ACK comment above.

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.

2 participants