Staged Agent Rollouts
With automatic updates on, a newly activated agent version doesn't have to reach the whole fleet at once. Turn on staged rollout and Athena sends the version to a canary group first, then to everyone else in waves. If too many agents in a wave fail, the rollout halts on its own, so a bad build stops at a few machines instead of reaching all of them. This is the pilot-then-production client upgrade pattern from System Center, built into the server.
Staging controls automatic pushes only. A manual push to selected agents from Pushing updates is never held back by a rollout. Uploading and activating builds is covered in Agent Binaries & Updates.
Turning staging on#
Go to Settings → Agents → Updates. The Staged rollout section is below the auto-update options. Tick Stage agent updates (canary first, then waves), fill in the fields, and click Save in the section header. The other fields are greyed out while the box is cleared. With staging off, an activated version is pushed to every older online agent at once.
| Field | Default | What it does |
|---|---|---|
| Canary collection | None | The agents in this collection go first, in the canary wave. |
| Canary tag | Empty | The agents with this tag also go in the canary wave. If you set neither a collection nor a tag, the first wave is the canary. |
| Wave size in | Percent of the remaining agents | Choose Percent of the remaining agents (a share of the agents left after the canary) or Agents per wave (a fixed number). |
| Wave size | 25 | 1–100 in percent mode, 1–100,000 in agents-per-wave mode. In percent mode the wave size is rounded up, so each wave has at least one agent. |
| Minimum time between waves | 30 minutes | 0–10,080 minutes (7 days). Counted from the time the current wave started, not from when it finished. |
| Stop when a wave's failures exceed | 20 % | 0–100. The failure rate that halts the rollout. |
| Wait for an updated agent to come back | 30 minutes | 1–1,440 minutes. An agent that hasn't come back on the new version within this time counts as failed. An agent that stays offline the whole time is skipped, not failed. |
An out-of-range value isn't saved. You get an error that names the field and its allowed range,
for example RolloutWaveDelayMinutes must be 0-10080.
The first time a server starts with this feature, it picks a default and saves it. If no agents are registered yet (a new install), staging is turned on. If agents are already registered (an upgrade), staging stays off, so existing behaviour doesn't change until you tick the box. The saved choice is never changed automatically after that.
How a rollout moves#
A rollout starts when you activate an agent binary while both auto-update and staging are on. Each operating system has its own rollout.
- Plan. The server lists every registered agent of that OS on an older version.
Offline agents are included. If none are older, no rollout is created. Matching agents in the
canary collection or with the canary tag form the
canarywave. The rest are split intowave 1,wave 2and so on, by the wave size you set. - First wave. The first wave starts immediately. Its online agents get the update right away. Its offline agents get it when they reconnect.
- Track. About every 30 seconds the server checks each agent in the waves that have started, and records an outcome for it (see Wave outcomes).
- Next wave. The next wave starts only when (a) every agent in the current wave has an outcome and (b) Minimum time between waves has passed since the current wave started. If a wave takes longer than the delay to finish, the next one starts as soon as it finishes.
- Complete. When the last wave has finished, the rollout is Completed. From then on, auto-update handles any remaining older agent of that OS normally when it connects, including agents enrolled after the rollout was planned.
While a rollout is running, only agents in a wave that has started can get the version automatically. An agent in a later wave, or one enrolled after the plan was made, waits.
Wave outcomes#
| Outcome | Meaning |
|---|---|
| Done | The agent now reports the new version or a later one. |
| Failed | The push to the agent failed, its update history shows the update to this version as failed or rolled back, or it wasn't back on the new version within Wait for an updated agent to come back after the push. |
| Skipped | The agent was offline for that whole wait after its wave started, so it never got the update. Skipped agents don't count toward the failure rate. A skipped agent still gets the version when it reconnects, as long as the rollout is running or completed. It stays counted as skipped. |
| Pending | No outcome yet, or the agent's wave hasn't started. |
An agent that goes offline partway through an update is only marked failed when the wait time runs out, because no failure has been recorded for it yet.
The automatic halt#
The server checks the current wave's failure rate on every check, without waiting for the
wave to finish. The rate is the number of failed agents divided by the number of agents in the
wave that were attempted (pushed to, or failed). When at least one agent has failed and the rate is
above Stop when a wave's failures exceed, the rollout changes to
Halted. The reason is shown, for example
canary: 2 of 5 agent(s) failed, over the 20 % threshold.
- At 0 %, one failure halts the rollout.
- At 100 %, the rollout never halts.
- While a rollout is halted, no agent gets that version automatically. That includes agents in a wave that already started and are just coming back online.
Watching and controlling a rollout#
Under the fields, Rollouts lists the latest rollout for each operating system, shown as the OS, the version and a status badge. It updates live, so you don't need to refresh the page. If there is no rollout yet, it shows No rollout yet. One starts when a new agent version is activated with auto update and staging on. Each rollout has a table with one row per wave: Wave (its name and agent count), Done, Failed, Skipped, Pending and Started. The current wave's row is marked. While a rollout is running, a line shows when the next wave can start.
| Status | Meaning | Buttons |
|---|---|---|
| Running | Waves are going out. | Pause, Abort |
| Paused | Stopped by an operator. No new wave starts, and no agent gets the version automatically. | Resume, Abort |
| Halted | Stopped automatically because a wave went over the failure threshold. | Resume (overrides the halt), Abort |
| Aborted | Stopped permanently by an operator, or replaced by a newer rollout. This can't be undone. | None |
| Completed | Every wave has finished. | None |
- Pause works only on a running rollout.
- Resume works on a paused or halted rollout. On a halted rollout it overrides the halt: more failures in that wave won't halt it again, and the next wave starts under the normal rules. A later wave can still halt the rollout.
- Abort ends the rollout permanently. Agents that already updated keep the new version. The aborted version isn't pushed automatically again. Only activating a version for that OS starts a new rollout, and a manual push still works.
If you activate another version for an OS that already has an active rollout, the old rollout is
aborted with the reason replaced by the rollout of <version>, and the new
rollout takes its place. The server keeps only the latest rollout for each OS.
Clearing the staging box turns off all rollout control, including a rollout that is halted or paused. Every older online agent then gets the version through normal auto-update. Use Pause or Abort to stop a rollout, not this box.
Turning auto-update off freezes a running rollout where it is: no new wave starts, and agents in a started wave aren't updated when they reconnect. Turning auto-update back on continues the rollout.
Server restarts#
Rollout progress is saved in the server's data directory as
agent-rollouts.json. A restart in the middle of a rollout doesn't re-push to the
fleet, and a halted rollout stays halted. Include this file in your data-directory backups. If the
file can't be read when the server starts, the error goes to the server log and the server starts
with no rollouts. A halt that was in place is lost, and that version is again pushed by normal
auto-update. Rollout state belongs to one server, so this feature assumes a single Athena server
node.
Audit events#
Every change of state is written to the audit log with resource
type AgentRollout:
| Event | When | Severity |
|---|---|---|
AgentRolloutStarted | A rollout was planned. The description gives the agent and wave counts. | Information |
AgentRolloutWaveStarted | The next wave started. | Information |
AgentRolloutHalted | A wave went over the failure threshold. | Warning |
AgentRolloutPaused / AgentRolloutResumed | An operator paused or resumed the rollout. | Information |
AgentRolloutAborted | An operator aborted the rollout. | Warning |
AgentRolloutCompleted | The last wave finished. | Information |
Events the server raises by itself (wave started, halted, completed) show the user
System (staged rollout). Wave pushes appear in the update history with the same
name in Initiated By.
Configuration#
The Settings fields are stored under AgentUpdate:Rollout in the server configuration.
You can also set them in appsettings.json or as environment variables, for example
AgentUpdate__Rollout__Enabled=true.
| Key | Default | Notes |
|---|---|---|
AgentUpdate:Rollout:Enabled | See the new-install default | Staging on or off. |
AgentUpdate:Rollout:CanaryCollectionId | Empty | A collection ID (GUID). |
AgentUpdate:Rollout:CanaryTag | Empty | A tag name. |
AgentUpdate:Rollout:WaveMode | percent | percent or count. Any other value is treated as percent. |
AgentUpdate:Rollout:WaveSize | 25 | Percent or number of agents, depending on the mode. |
AgentUpdate:Rollout:WaveDelayMinutes | 30 | Minimum minutes from one wave's start to the next one's. |
AgentUpdate:Rollout:HaltFailurePercent | 20 | Failure rate that halts the rollout. |
AgentUpdate:Rollout:ReconnectTimeoutMinutes | 30 | How long to wait for a pushed agent to come back on the new version. |
Roles#
| Action | Required permission |
|---|---|
| Change the staged rollout settings, and use the Settings section | settings.manage |
| Read rollout status over the REST API or PowerShell | agents.update.view (Operator and Admin) |
| Pause, resume or abort a rollout | agents.update (Admin) |
See Permission Model.
REST API#
| Method & path | Purpose |
|---|---|
GET api/agent-updates/rollouts | The latest rollout for each OS, newest first. |
POST api/agent-updates/rollouts/{id}/pause | Pause a running rollout. |
POST api/agent-updates/rollouts/{id}/resume | Resume a paused rollout, or override a halt. |
POST api/agent-updates/rollouts/{id}/abort | Abort a rollout permanently. |
GET / PUT api/settings/agent | The settings, as the rolloutEnabled, rolloutCanaryCollectionId, rolloutCanaryTag, rolloutWaveMode, rolloutWaveSize, rolloutWaveDelayMinutes, rolloutHaltFailurePercent and rolloutReconnectTimeoutMinutes fields. PUT replaces the whole agent settings block (see Agent Binaries & Updates). An out-of-range value returns 400. |
The control calls return the updated rollout. An unknown ID returns 404
(Rollout not found). An action the current status doesn't allow returns
409, for example Cannot pause a rollout that is halted. Each rollout
has id, os, version, status
(running, paused, halted, aborted or
completed), currentWave, startedAt,
startedBy, finishedAt, reason, nextWaveAt
and waves. Each wave has index, name,
startedAt, settledAt, total, done,
failed, skipped, pending and
failedAgentIds (up to 20 failed agents to look at first).
PowerShell#
Module version 2.14.0 and later includes four cmdlets. All of them support -WhatIf:
| Cmdlet | Purpose |
|---|---|
Get-AthenaAgentRollout | List the latest rollout for each OS, or a single rollout with -Id. |
Suspend-AthenaAgentRollout | Pause a rollout by -Id. Accepts input from the pipeline. |
Resume-AthenaAgentRollout | Resume a paused rollout, or override a halt. High impact, so it asks for confirmation. |
Stop-AthenaAgentRollout | Abort a rollout permanently. High impact, so it asks for confirmation. |
# See every rollout and its per-wave progress
Get-AthenaAgentRollout | Select-Object -ExpandProperty Waves
# Pause whatever is running
Get-AthenaAgentRollout | Where-Object Status -eq running | Suspend-AthenaAgentRollout
# Look at a halt, then override it and continue
$r = Get-AthenaAgentRollout | Where-Object Status -eq halted
$r.Reason
Resume-AthenaAgentRollout -Id $r.Id
See the PowerShell Module reference for full cmdlet details.
Rollouts run entirely on your Athena server. The server pushes each wave over the connections your agents already hold, so nothing leaves your network. See Air-Gapped Operation.