Repository navigation
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
Draft
Run the collector's queued cluster actions as om cluster, and push the asset after an update pkg#1231sghf wants to merge 3 commits into
sghf wants to merge 3 commits into
Conversation
…with cluster, not as om node
…e collector knows the new version
…ner being running before the source goroutine counted its run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Queued actions starting with
clusterrun asom 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 runnerprefixed every command without a service with
node, so it ranom node cluster update pkg, which fails.QueuedAction.cmdArgs()now leaves such a command as it is. The other casesare 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 runnerprefixed every command without a service with
node, so it ranom node cluster update pkg, which fails.QueuedAction.cmdArgs()now leaves such a command as it is. The other casesare unchanged:
Svcnameset:om svc -s <name> …SvcIdset withoutSvcname: no prefixom node …TestQueuedActionCmdArgscovers these cases, plus a service action namedcluster, which keeps itssvc -sprefix.Push the asset after an update pkg
The v2 agent ran
om node pushassetat the end of a successfulupdatepkg,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.scheduledefaults to~00:00-06:00).Node.UpdatePkgnow runsom node push assetafter 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, andom cluster update pkg, whose orchestration runsom node update pkgon eachnode in turn.
Flaky
TestRunnerRunsOnDemand(69c2dfe)The runner switches to
runningas soon as the source goroutine starts, which can be beforefakeSource.Runcounts the run. The test read the counter right afterwaitState(running)and sometimes failed in CI withexpected: 2, actual: 1. It now waits for the count, usingwaitRuns. Passes withgo test -race -count=100 -run TestRunner ./daemon/evwatch/.