Skip to content

Run the collector's queued cluster actions as om cluster, and push the asset after an update pkg - #1231

Draft
sghf wants to merge 3 commits into
opensvc:mainfrom
sghf:updatepkg
Draft

sghf wants to merge 3 commits into
opensvc:mainfrom
sghf:updatepkg

Conversation

@sghf

@sghf sghf commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Queued actions starting with cluster run as om cluster …

The collector queues a cluster-wide action on one of the cluster nodes, as a
command starting with cluster (e.g. cluster update pkg). The queue runner
prefixed every command without a service with node, so it ran
om node cluster update pkg, which fails.

QueuedAction.cmdArgs() now leaves such a command as it is. The other cases
are unchanged:

The collector queues a cluster-wide action on one of the cluster nodes, as a
command starting with cluster (e.g. cluster update pkg). The queue runner
prefixed every command without a service with node, so it ran
om node cluster update pkg, which fails.

QueuedAction.cmdArgs() now leaves such a command as it is. The other cases
are unchanged:

  • Svcname set: om svc -s <name> …
  • SvcId set without Svcname: no prefix
  • otherwise: om node …

TestQueuedActionCmdArgs covers these cases, plus a service action named
cluster, which keeps its svc -s prefix.

Push the asset after an update pkg

The v2 agent ran om node pushasset at the end of a successful updatepkg,
so the collector showed the new agent version right away. With om3 the
collector only learned it at the next scheduled asset push, up to a day later
(asset.schedule defaults to ~00:00-06:00).

Node.UpdatePkg now runs om node push asset after a successful update,
except in dry-run mode. It starts a new process from the upgraded executable,
because the running process is still the binary that was replaced and would
report the old version. A failed asset push is only a warning: the package
update itself succeeded.

This covers om node update pkg, the action queued by the collector, and
om cluster update pkg, whose orchestration runs om node update pkg on each
node in turn.

Flaky TestRunnerRunsOnDemand (69c2dfe)

The runner switches to running as soon as the source goroutine starts, which can be before fakeSource.Run counts the run. The test read the counter right after waitState(running) and sometimes failed in CI with expected: 2, actual: 1. It now waits for the count, using waitRuns. Passes with go test -race -count=100 -run TestRunner ./daemon/evwatch/.

Comment thread core/object/node_update_pkg.go Resolved
…ner being running before the source goroutine counted its run
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.

1 participant