Agent updates
A host is visited once for agent updates, when it is enrolled or first upgraded, and never again to update its agent. After that you roll out a signed build from the dashboard, a canary first, and a host installs it only if it agreed to updates and a key it pinned signed the build.
How it works
Section titled “How it works”A host never installs an agent build because the server said so. Four things decide, and the host checks each one itself:
| What | Who sets it | How the host uses it |
|---|---|---|
| Consent | Someone on the host, once, through the Add device or Upgrade agent command. | A host with no consent, or with Off, never fetches a build. |
| A pinned key | You, by the fingerprint that command carries. | The host installs only a build signed by a key it pinned. |
| A release counter | The server numbers each release. | While its update step stays installed, the host remembers the highest counter it tried and refuses a replay or an older build. Turning updates off or uninstalling the step removes that record. |
| A trial | The host. | It keeps the old build, runs the new one for five minutes and takes it back if it doesn’t check in healthy. |
The server’s job is to offer a signed build, count what each device reports and stop when devices fail. With A key kept offline it can’t sign a build at all.
Before you start
Section titled “Before you start”| You need | Why |
|---|---|
| The Administrator role and your password | Turning updates on or off and changing the release key ask for the password. |
| Hosts that were added with a choice about updates | A host agrees to updates when it is enrolled or first upgraded. See What a host agrees to. |
| A build in this server’s catalog that devices don’t run yet | Devices → Agent updates lists them under Newer builds. |
| For a key kept offline: a machine that holds the private key | You make the key and sign each release there with vectory release. See Sign a release you keep offline. |
Agent updates are off until an administrator turns them on. While they’re off, the dashboard shows nothing about them except this setting, no agent asks for an update and every other page works as before.
Turn on agent updates
Section titled “Turn on agent updates”- Open Settings → Agent updates and choose Turn on agent updates….
- Under Who holds the release key?, choose This server signs or A key kept offline. Nothing is chosen for you. Choose who holds the release key compares them.
- For A key kept offline, paste the public key line into Public key. The dashboard computes the key’s fingerprint from what you pasted and shows it, so you can compare it with what
vectory release keygenprinted. - Enter Your password and choose Turn on agent updates.
You should see Agent updates are on, the key’s fingerprint under Release key, and a new tab, Devices → Agent updates.
Turning updates on changes nothing on any host. A host takes its first update only after it agreed to updates, and the first release is yours to prepare.
Choose who holds the release key
Section titled “Choose who holds the release key”| This server signs | A key kept offline | |
|---|---|---|
| Where the private key is | On the server, sealed with the instance’s own key. | On a machine you choose. The server holds the public half only. |
| Who can approve a build | Anyone who administers this server, or holds a backup of it. | Whoever holds the key file. |
| A prepared release | Signed at once, ready to roll out. | Waits for your signature: nothing is offered until you sign it. |
| Changing the key | Rotate key…: one step, and hosts follow by themselves. | Upload rollover…: you sign a statement with the old key. |
The choice is fixed while updates are on, because every host that pinned the key trusts that arrangement. To change it, turn updates off and on again with the other choice. That makes a new key. Hosts that pinned the old one take the new one only when you run their Upgrade agent command again, and Settings → Agent updates lists them under Hosts that trust an older key.
Choose This server signs to start quickly, on a server only a few people administer. Choose A key kept offline when no one with access to this server, or its backups, should be able to put software on your hosts.
What a host agrees to
Section titled “What a host agrees to”A host agrees to updates once, in the command you run on it. Add device and Upgrade agent show a step called Agent updates while updates are on. With updates off the step isn’t there, and the command is the one you always had. Nothing is chosen for you:
| Choice | The host |
|---|---|
| Automatic (recommended) | Installs a new build when an update rollout reaches it, inside the window you set. |
| Ask on the host | Downloads and checks the build, then waits. Someone on the host runs sudo vectory update apply for each build. |
| Off | Updates only by hand. The command writes no key. |
Ask on the host is the one choice that needs a person on the host again. It isn’t a visit to set anything up: it’s the host’s own decision, made each time, to install a build it already checked.
For Automatic and Ask on the host you also choose:
- Which releases? Patch releases (the default) takes new patch versions of the version it runs now. Minor releases too also takes new minor versions. A host never takes a new major version: upgrade to one by hand.
- Update windows (optional). When an update may start, one window per line, such as
Mon-Fri 02:00-04:00orSat,Sun 01:00-03:00 UTC. Times are the host’s own unlessUTCfollows. A window decides when an install starts; a trial that began inside it can end after it. Empty means any time. - The key it pins. The step shows it, for example
Pins key 3f9a1c0277de9b41 · kept offline, so whoever runs the command sees what the host will trust. The command carries the key’s full fingerprint, never a shortened one.
The command passes your choices to vectory setup. For example, Automatic with a window adds the last four lines below. Copy the real command from the dashboard: it carries your key’s fingerprint, and nothing here is one to paste.
sudo sh "$dir/vectory-install.sh" \ --mode restricted \ --updates auto \ --update-key-sha256 <64-hex-fingerprint> \ --update-track patch \ --update-window 'Mon-Fri 02:00-04:00'The host’s choices live in a file only root can write (SYSTEM and the Administrators on Windows): /etc/vectory/updates/policy.json on Linux, /Library/Application Support/Vectory/updates/policy.json on macOS and %ProgramData%\Vectory\updates\policy.json on Windows. Nothing the server sends can change them, and nothing changes them later unless someone runs a command on that host again. That command keeps what the host chose: with no update flag it changes nothing about updates, and to change one thing it carries only that thing, such as the key to pin or the releases to take. The host applies it to what it already agreed to, so a command never has to state the host’s choices again. See Change what a host agreed to.
A host that was installed without consent
Section titled “A host that was installed without consent”A host you added before you turned updates on has agreed to nothing, and so has a host that reports no update information at all (its agent predates updates). It takes one more run of its Upgrade agent command, with a choice made there:
- On the device’s page, choose Upgrade agent. Under Agent updates, choose Automatic (recommended), Ask on the host or Off.
- Run the command it shows on the host. Without a choice the command only upgrades the agent and changes nothing about updates.
A host that already takes updates shows This device takes updates from the dashboard in the same dialog, with Roll out to this device. Its Upgrade agent command carries no update choice: running it upgrades the agent and leaves what the host agreed to as it is. When something about updates needs fixing on that host, such as the key it pins or the releases it takes, the command carries only that fix.
On Linux and macOS the command is the installer, run again. A Windows host has no installer to run, so Upgrade agent shows a setup command for the agent that is already installed, to run in an elevated PowerShell on the host. It carries only the update flags (and --state-dir when the agent keeps its state elsewhere), replaces no file, and setup keeps the address the host enrolled with. A Windows host that reports no update information runs an agent that predates updates: upgrade it by hand first, then choose and run the command. Add device carries the choice for a Windows host you add now. The same command with one flag changes one thing the host agreed to. See Agent updates in setup.
What a host needs to take an update
Section titled “What a host needs to take an update”Even with consent, a host takes an update only where it is safe to replace the agent. The dashboard shows what a host can’t do, in words, on its page and in the review:
| The host says | What to do |
|---|---|
Installed by a package manager (PACKAGE_MANAGED) |
Update it with the package manager. The system’s own directories count, and so do Homebrew’s (/opt/homebrew, /usr/local/Cellar) and, on a Mac only, MacPorts’ (/opt/local). |
No service keeps the agent running (NO_SERVICE) |
Run it under a service, then upgrade it with its Upgrade agent command. |
Install path others can write (UNTRUSTED_LOCATION), Install directory can’t be written (READ_ONLY) |
Change who owns them or their permissions: only root may own and write the agent’s directories and every directory above them. On a Mac, an access list entry that gives another account anything but reading, listing and searching counts too, whatever it is called: ls -led /usr/local/bin shows the entries and sudo chmod -N /usr/local/bin removes them. So does a volume that doesn’t keep owners (an external disk or a disk image attached with ownership ignored, where every account counts as an owner of every file) and one that isn’t stored on the Mac (a network share): the message names the volume, and sudo diskutil enableOwnership /Volumes/Name turns ownership on for one that ignores it; otherwise install the agent on the system volume. Homebrew on an Intel Mac owns /usr/local/bin, so install the agent in another directory only root can write, with the installer’s --install-dir. Install directory can’t be written also means that the agent, its directory, or the build an earlier update kept beside it (.vectory-previous, or .vectory-previous.new) carries an immutable or append-only flag, which would make the swap fail after the service had stopped: on Linux lsattr -d /usr/local/bin/vectory /usr/local/bin /usr/local/bin/.vectory-previous* shows i or a and sudo chattr -i or sudo chattr -a clears it, and on a Mac ls -lOd shows uchg, schg, uappnd or sappnd and sudo chflags nouchg (or noschg, nouappnd, nosappnd) clears it. The update step’s log names the path and the flag. On Windows, only SYSTEM, the Administrators and TrustedInstaller may own or change the agent’s directory and the agent. icacls "C:\Program Files\Vectory" shows who can, and the message names an account that holds a right to write, delete, add files or take ownership. The directories above them may let other accounts add files and folders, as Windows does in C:\ and in C:\ProgramData. None may delete, rename or take over what a directory holds, and none may be owned by another account. Setup makes %ProgramData%\Vectory, where the agent’s state, the update policy and the update step keep their files, so that no other account can add to it or change it. setup closes one that is there, belongs to root and is open to others, whether or not you turn updates on. If another account owns %ProgramData%\Vectory, setup stops before it changes anything and names that account. With --updates, setup does the same for an updates or update-state folder in it that another account made. Look at what a folder holds before you remove it, because that account could have changed it. A state directory somewhere else (--state-dir) isn’t affected. The check reads access lists, and an account that holds the right to back up files, restore files or take ownership of files bypasses them and appears in none, so no message names it. The Backup Operators group holds the first two and is empty by default. A host that takes updates trusts such accounts as it trusts the Administrators: whoami /priv shows the rights of the account that runs it, and secpol.msc shows who was given them. |
Update step isn’t running (HELPER_NOT_RUNNING) |
Run sudo vectory doctor on the host. It prints the fix. On Windows the step is the VectoryUpdate service: run vectory doctor in an elevated PowerShell, and sc.exe query VectoryUpdate shows whether it runs. |
Service definition is older than this release needs (SERVICE_DEFINITION_OUTDATED) |
Run the Upgrade agent command once. |
Not in this release (PLATFORM_NOT_IN_RELEASE) |
Update this host by hand. A release carries only the platforms in this server’s catalog. An agent built without updates for its operating system says the same and refuses setup --updates. |
Prepare a release
Section titled “Prepare a release”A release is a build from this server’s catalog, with a counter, an expiry 180 days away and the signature hosts check.
- Open Devices → Agent updates. Under Newer builds, find the version and choose Roll out agent 0.1.1 (an Administrator does this step).
- Read what Prepare agent 0.1.1 says and choose Prepare release.
With This server signs, the release is ready and the review opens. With A key kept offline, it appears under Releases as Waiting for your signature, and nothing is offered until you sign it.
Only a signed, unexpired release that isn’t withdrawn can start a rollout. Withdraw… retires a release, with a reason. A withdrawn release can’t come back: prepare it again for a new counter. You can keep 20 releases that aren’t withdrawn, within the space VECTORY_AGENT_RELEASE_STORAGE_BYTES sets (2 GiB by default; see Server configuration).
Sign a release you keep offline
Section titled “Sign a release you keep offline”You sign on the machine that holds the private key. The server never sees it.
-
Once, make the key.
vectory release keygenwrites the private key to a file only you can read, prints the public key line and the fingerprint, and never replaces a file:Terminal window vectory release keygen --out team.key --name teamKeep
team.keyoff the server and back it up somewhere you control. Paste the public key line when you turn updates on. -
On the waiting release, choose Download release.json. It is the exact file to sign: nothing re-writes its bytes.
-
Get
SHA256SUMSfor this version’s builds from the project’s release page, or from your own build of the same source. Don’t take it from this server. The signer checks the manifest against that list, and a list from the server would only check the server against itself. From your own build:Terminal window sha256sum vectory-0.1.1-linux-amd64 vectory-0.1.1-linux-arm64 > SHA256SUMS -
Put
release.jsonandSHA256SUMSbeside the key and sign:Terminal window vectory release sign --key team.key --checksums SHA256SUMS release.jsonIt signs only when every build in
release.jsonmatchesSHA256SUMS. It shows the version, counter, expiry and each platform, asks first and writesrelease.json.sig. -
On the release, choose the file under Signature file and Upload signature. The page says which key the file holds a signature by before you send it. The server keeps the file only if it verifies against the current key.
You should see Signature accepted and the release turn Ready. Check a signature yourself first with vectory release verify --key team.pub release.json: it uses the same check every host does.
Roll out an update
Section titled “Roll out an update”An update rollout is separate from a pipeline deployment. It has its own page and its own gates, and the two can’t affect each other. It always starts with a canary and releases the rest in batches. There’s no all-at-once.
- On a ready release, choose Update devices…, or choose New update rollout under Update rollouts. To update one device, choose Roll out to this device in its Upgrade agent dialog.
- Choose the Release, then devices and groups. A group sends the update to the devices it holds when you start; a device that joins later isn’t added.
- Set the rollout: Canary size (default 1), Then batches of (default 10), Watch each stage for (default 300 seconds) and Stop if more than (default 0 failures: the first rollback or failure stops it). Add a Name (optional).
- Choose Review, read it (Read the review), then choose Start update rollout.
Nothing starts until you choose Start update rollout, and the server checks that the review is still true when you do. If a device, the release or the key changed meanwhile, it starts nothing and asks you to review again. A rollout starts with every device Pending and releases its canary at once.
Read the review
Section titled “Read the review”The review lists every device you chose exactly once:
- Will update · N: the devices that will take the build, with how each takes it (Automatic or Ask on the host) and when it can start. The canary is chosen for you, among devices that take updates by themselves, or by you with Canary devices. The canary’s result is what its devices report, so name canary devices your team trusts.
- Won’t update · N: each device that won’t, grouped by the first reason that applies, with the fix. For a reason a command fixes, Commands for the host gives the Upgrade agent command for that host, with only the flag that fixes it:
--update-key-sha256with this server’s current key to re-pin,--update-track minorfor the track. The host applies it to what it already agreed to and keeps the level, the windows and any pause as they are. For a host that has no consent to keep, you choose how it should take updates first. - Worth knowing: devices that will update but may be slow: offline now, waiting for someone on the host, waiting for a window or paused on the host.
| Group | Means |
|---|---|
Updates are off on the host (UPDATES_OFF) |
Its consent is Off, or it never agreed. Run Upgrade agent with updates on, once. |
Agent too old, or no update report (AGENT_TOO_OLD) |
It predates updates and reports nothing about them. Run Upgrade agent once. |
Doesn’t pin this release’s key (KEY_NOT_PINNED) |
No key it pins reaches the release’s signer. Run Upgrade agent with the current key. If a key that is no longer current signed the release, the review says so: a host follows keys forward only, so withdraw the release and prepare it again, and the current key signs it. |
Tried this release and rolled back (RELEASE_ALREADY_TRIED) |
It takes the next release, never this one again. |
Already tried a newer release (COUNTER_REPLAYED) |
This release’s counter is at or below one the host tried. Prepare a new release. |
Outside the host’s track (VERSION_NOT_ON_TRACK) |
It takes patch releases only. Run Upgrade agent with Minor releases too: the command carries only the track, and the host keeps its level and its windows. |
Already on this version (ALREADY_RUNNING), Runs a newer version (DOWNGRADE_REFUSED) |
Nothing to do. An update never goes backward. |
Frozen on a key fork (KEY_ROLLOVER_CONFLICT) |
It saw two successors of its key and accepts no update. Run Upgrade agent with the right key. See If a key is stolen. |
| Installed by a package manager, No service keeps the agent running, Install path others can write, Install directory can’t be written, Update step isn’t running, Service definition is older than this release needs, Not in this release | The host can’t take an update. See What a host needs to take an update. |
In another update rollout (IN_ANOTHER_UPDATE) |
A device has at most one unfinished update at a time. Wait for that rollout or cancel it. |
A device whose access was revoked can’t be chosen for a rollout, and one revoked while a rollout runs is skipped.
Watch a rollout
Section titled “Watch a rollout”Open a rollout from Devices → Agent updates. The page shows how many devices updated, the stages and why devices rolled back or failed. A device counts as updated only when it checks in on the new build after the restart and its host reports it healthy. A download, a staged file or a swap never counts.
| State | Means |
|---|---|
| Pending | Waits for its stage to be released. |
| Offered | The offer reaches it at its next check-in. |
| Downloading, Staged | The agent is fetching and checking the build, or has it ready. |
| Waiting for the host | Staged on a host set to Ask on the host. Someone runs sudo vectory update apply. |
| Waiting for its window | Staged on an Automatic host with no window open. It installs when one opens. |
| Applying, Trying the new build | The host is swapping in the build, or watching it for five minutes. |
| Updated | The new build checked in after the restart and is healthy. |
| Rolled back | The host took the build back. It won’t try this release again. |
| Refused, Failed | The host’s own rules refused it, or the update failed. The page shows the agent’s reason. |
| Cancelled, Skipped | It never started: the rollout ended first, the device never became ready, its access was revoked, its host dropped the offer (paused, turned updates off or took another release), or it stayed at Offered, Downloading or Staged for an hour. The page shows the host’s reason when it gave one. |
Each stage waits until every device it released is done or waiting on its host, then watches them for the time you set. A device that falls back or goes silent restarts the watch, and a device whose pipeline stops delivering after the update counts as a failure. A device whose access was revoked, or that has been silent for longer than the watch lasts and three check-in intervals, is no longer watched: it doesn’t hold the rollout back and doesn’t count as failing. The canary also needs at least one Updated device that is still watched. A device silent for 30 minutes after it started applying becomes Failed.
When more devices roll back or fail than Stop if more than allows, the rollout stops. Devices already applying finish their trial. The rollout is Completed when no device is pending or waiting and every released one is done.
A device that waits for its host or its window keeps its offer, and offers come only from a rollout that is running, so the rollout stays Active until that device installs or you cancel the rollout. Later stages don’t wait for it. You can’t turn updates off while a rollout is active or paused, so cancel it first if nobody will approve the waiting hosts.
A rollout doesn’t stay open for ever when nothing can move it:
- A release expires. Its rollouts end as Cancelled, as a withdrawal ends them. Devices already applying finish.
- No progress for 24 hours. A rollout that has devices it can’t move on (none that can be released, a build that never changes state, an observation held by a device that stays on the old build) and made no progress for 24 hours ends as Failed, and says so. Unstarted offers are withdrawn and devices already applying finish. A change of any device, a stage released, a watch that starts or ends, or a resume counts as progress. Waiting for a person or a window is not stalled: that is by design, and you cancel the rollout when nobody will act.
Pause, resume or cancel
Section titled “Pause, resume or cancel”On the rollout page, an Operator or Administrator can:
- Pause: stops releasing and withdraws every offer that hasn’t started. Those devices return to Pending and their agents discard what they staged. Devices already applying finish.
- Resume: watches the current stage again from the start, then releases through the same gates.
- Cancel rollout: withdraws unstarted offers and ends the rollout. A cancelled or stopped rollout never resumes: review a new one for the rest.
Stop all updates
Section titled “Stop all updates”Stop all updates is for the moment a build is wrong and you need every update to stop. It’s on Devices → Agent updates, for Operators and Administrators. Give a reason; everyone sees it.
It cancels every update rollout, withdraws every offer and refuses new rollouts until an administrator chooses Clear the stop in Settings → Agent updates. Devices already trying a build finish. A device that already downloaded one may still start until its next check-in tells it of the stop, usually within a minute, and the update step looks for work every 30 seconds. A host that checks in less often takes longer. Clearing the stop resumes nothing: the rollouts it cancelled stay cancelled.
A server restored from a backup stops all updates too, as a local administrator, until an administrator has reviewed what the backup brought back. See Restore a backup.
When a host rolls back
Section titled “When a host rolls back”The host takes a build back when the new agent doesn’t start, doesn’t check in within five minutes, isn’t healthy or is interrupted twice. It restores the previous build from a copy it kept, and reports the reason. The device shows Rolled back with that reason, and the dashboard opens an issue (AGENT_UPDATE_ROLLED_BACK) that appears in Needs you on the Overview. A host that had already started when you paused, cancelled or stopped the rollout, and then rolled back, is recorded the same way, once: the issue and the audit entry appear, and a paused rollout counts it toward its failure threshold.
A rolled-back release is never tried again on that host. The host remembers the release counter and the release, so even a new rollout can’t make it try the same build twice. It takes the next release, which carries a higher counter. To retry, fix the cause, prepare a new release and roll it out. That record is in the update step’s directory, which vectory update off and service-uninstall delete: a host that turns updates off and on again starts it afresh, and can try a release it took back before if it is offered again.
Most rollbacks have one of these reasons:
| Reason | Means |
|---|---|
The new build couldn’t start (START_FAILED) |
The service manager showed the new agent failing to start: it kept exiting and being started again, three restarts in all, or the manager couldn’t start it. |
The new build didn’t check in within 5 minutes (NO_CHECK_IN) |
It started but couldn’t reach the server. |
The new build started but wasn’t healthy (UNHEALTHY) |
The service or Vector wasn’t running as it was. |
The update was interrupted (INTERRUPTED) |
A crash or power loss stopped it more than once. |
The previous build isn’t healthy either (ROLLBACK_UNHEALTHY) |
The previous build was started again and didn’t report healthy within five minutes, or it couldn’t be put back. Run sudo vectory update status and sudo vectory doctor on the host: they say to look at the agent’s service and the update step’s log first, then at the network and the server. |
The previous build gets five minutes from the moment it starts again, however long the new build took to stop.
A rollback that can’t start the previous build isn’t over. If the service manager refuses to start the previous build, the update step doesn’t report it as unhealthy: nothing shows that it is, only that it isn’t running. The host has no agent until a start works. The step tries again every 30 seconds, and goes on until it can. While it does, sudo vectory update status shows the update as rolling back with a line saying that the update step is trying to start the previous build again, and a Look at row; sudo vectory doctor says the same. Look at the agent’s service (systemctl status vectory.service on Linux, sudo launchctl print system/io.vectory.agent on a Mac, sc.exe query Vectory on Windows) and the update step’s log (journalctl -u vectory-update.service -n 50 on Linux, /Library/Application Support/Vectory/update-state/private/step.log on a Mac, update-step.log in %ProgramData%\Vectory\update-state\private on Windows): each try that failed is one line there. The device shows nothing new until a start works.
A rollback that can’t stop the build it takes back isn’t over either. The step stops the agent’s service before it puts the previous build back. If the stop fails, the build that was tried may still be running, and nothing shows that the previous build, which isn’t in place yet, is anything: the step puts nothing over a build that runs, keeps the rollback open and tries again 30 seconds later. The same goes for a stop that fails before the swap, when the service manager then can’t be shown to be up with the old build: the step ends the update only with the result of a build that ran. Where the service manager refuses to start the agent, putting that right (the commands are below) lets the step’s next run finish the update.
On a Mac, a job that launchd is still removing doesn’t count as a start. launchd goes on listing the job as running until it has removed it, also when the stop was cut short (Ctrl-C on vectory update apply, a dropped SSH session) or the step was killed. So the step writes a record of the job before it asks launchd to remove it, and the record holds for up to eight minutes, longer than launchd takes to finish. What launchd answers to the removal can’t tell a refusal from a removal that is under way: where launchd refuses outright, the agent keeps running and the update ends as interrupted once the record is over. Where the record can’t be written, the step doesn’t ask launchd to remove anything, and the update ends as interrupted at once.
sudo vectory update off and sudo vectory service-uninstall end a rollback that waits for a start. A service that can never start (its job disabled with launchctl disable, its unit masked) would keep the step trying for ever, and would keep you from turning updates off or removing the service. When the previous build is already back in place and only its start is missing, both end the rollback as the step ends an update interrupted after the swap, and they go on to do what you asked. Nothing tries to start the agent’s service afterwards, and update off says so: start it yourself if it isn’t running.
A rollback that the removal ends reports no result. The two commands record the end in the update step’s own files, which the same command removes, so nothing reports a result for the update. The dashboard doesn’t show Rolled back for the device. Its update stays Applying (or Trying the new build) until the server fails it, 30 minutes after the device started applying (for a rollback that was held that long, it has already), as Failed with “The device went quiet while it updated, and Vectory never saw the new build check in.” (NO_REPORT), and Needs you says so.
What the two commands wait for, and when they refuse. On a Mac the update step can be busy for a minute at a time with its tries to start the agent’s job, so both wait for its run to end, up to a minute and a half, before they say that the step is working (a run whose launchctl calls hang can last longer, and then you run the command again). While the previous build isn’t in place yet, or the update step is watching a previous build that is running, they refuse at once with an update is being rolled back on this host; the update step puts the previous build back and starts it, tries every 30 seconds until it can, and then watches it for up to 5 minutes, and name no time, because none is known: run the command again a little later. A previous build that starts and ends again isn’t running when they look, so they wait for the update step’s run first, as they do for a start that is refused.
When the agent’s service isn’t registered, update off and service-uninstall refuse in other words. If its definition, unit or service was removed by hand, the update step can’t find the executable the service runs, so it can’t say that the previous build is in place and can’t start it, and the commands say so: that the agent’s service isn’t registered (naming what is missing), that the update step can’t start the previous build, and to register the service again with sudo vectory service-install, after which the update step finishes the rollback by itself, usually within a minute or two. On Windows run vectory service-install in an elevated PowerShell. Give it the --state-dir the service was registered with, if that isn’t the default, and on Linux and macOS its --service-user. An open rollback doesn’t hold up service-install.
update off that stops halfway says what it did. If the update step begins a run between the moment update off checks and the moment it removes the step, so that the removal is refused after the policy was turned off and the staged build deleted, the command says so (Done so far: the policy says off, the staged build is deleted.) and that running it again finishes turning updates off.
To start the agent by hand, which is also what ends an update that stopped the agent’s service and can’t start it again (an update is being applied on this host; the update step stops the agent's service, replaces the executable and starts the service again, and tries every 30 seconds if it can't, which update off and service-uninstall say while it waits), find out why the service manager refuses it. On Linux, run sudo systemctl unmask vectory.service if the unit is masked, then sudo vectory service-start; if the unit was removed, sudo vectory service-install writes it again. On a Mac, run sudo launchctl enable system/io.vectory.agent if the job was disabled, and check that /Library/LaunchDaemons/io.vectory.agent.plist exists (sudo vectory service-install writes it again), then sudo vectory service-start. On Windows, run sc.exe config Vectory start= delayed-auto if the service is disabled, then vectory service-start in an elevated PowerShell; if the service was deleted, vectory service-install in an elevated PowerShell registers it again. sudo vectory doctor shows what the service manager says.
An update interrupted before the host replaced the agent isn’t a rollback. A crash or a power cut while the update step prepared the build changes nothing on the host: it runs the agent it ran. The rollout page shows the device as Failed, the device page says the update was interrupted and nothing was installed, and Needs you says the update didn’t finish. Prepare a new release to try again. The host counts a release as tried a moment before it replaces the agent, so a crash in that moment can spend the release’s counter. The same release is then refused as Already tried a newer release (COUNTER_REPLAYED), and a new release with a higher counter installs.
Rotate or replace the release key
Section titled “Rotate or replace the release key”A key changes in one of two ways, and hosts follow either without a command. A statement signed by the old key names its successor. A host that pinned the old key follows it the next time it’s offered a release the new key signed.
Rotate a key the server holds
Section titled “Rotate a key the server holds”In Settings → Agent updates, choose Rotate key… and enter your password. The server makes a new key, signs a statement from the old key to it and retires the old one.
Roll over a key you keep offline
Section titled “Roll over a key you keep offline”-
On the machine that holds the old key, make the new key, then the statement.
rolloverwritesrollover.json:Terminal window vectory release keygen --out team-next.key --name team-nextvectory release rollover --key team.key --to team-next.pubSave the public key line
keygenprinted inteam-next.pub. -
In Settings → Agent updates, choose Upload rollover… and choose
rollover.json. The page shows the new key’s fingerprint, and the key it replaces. -
Enter your password and choose Upload rollover.
The old key stays on record as retired, and Hosts that trust an older key lists the hosts that haven’t followed yet. Custody doesn’t change: a rollover moves an offline key to another offline key.
Revoke a key
Section titled “Revoke a key”Revoke key… in Key history withdraws the releases only that key signed, ends the rollouts that offer them and removes the key and its statements from the key list hosts read. It can’t be undone. Revoking the current key leaves updates on without a key: choose Set a release key… to start again. Nothing can be prepared until then.
If a key is stolen
Section titled “If a key is stolen”Revoking a key stops this server from offering anything it signed. It doesn’t unpin the key on any host. A host trusts a key until someone runs its Upgrade agent command with another one. Do this:
- Stop all updates, so nothing signed by the stolen key goes out meanwhile.
- Revoke the stolen key, then set a new one with Set a release key….
- Run each affected host’s Upgrade agent command, which now pins the new key. It re-pins and changes nothing else: the host keeps its level, its track, its windows and any pause. Settings → Agent updates lists the hosts that pin the revoked key, and the review gives each one’s command. This step stays manual, host by host.
A thief who holds the key before you roll it over can sign a statement of their own from it. A host that sees two successors of one key stops accepting updates and reports KEY_ROLLOVER_CONFLICT. Its update step writes that down on the host within a minute, so it stays stopped when the offer goes away, when the agent restarts, and for a release signed by one of the two successors that carries only one of the statements. Settings → Agent updates lists them as hosts frozen on a fork, and each one needs its Upgrade agent command with the key you trust.
Update one host by hand
Section titled “Update one host by hand”These are the host’s own commands. They need sudo on Linux and macOS, and an elevated PowerShell on Windows.
sudo vectory update statussudo vectory update applysudo vectory update pausesudo vectory update resumesudo vectory update offstatusshows the policy, the keys the host pins, what it is doing and the result of its last update.applyinstalls a build a host set to Ask on the host has staged. Before it does, it reads what the agent last reported and stops if the offer was withdrawn or the agent hasn’t checked in for five minutes. That check is advice: the file it reads is written by the agent, so it can warn you but can’t prove an offer is still good.--forceapplies anyway, after you confirm on a terminal. If an earlierapplywas interrupted after the swap,applyrefuses and leaves the update to the update step, which settles it by itself, usually within a minute or two.statusshows where it stands.pausekeeps the host’s choices and stops every download and install untilresume.sudo vectory pause, which holds back every change on the host, does the same: the update step leaves a build the agent staged waiting until you runsudo vectory resume.offwithdraws the host’s consent: the policy says off, the build the agent staged is deleted and the update step is removed. It removes a step that an earlier build installed even when this build doesn’t ship updates for the operating system, and says the step is removed only when its directory is gone: a step it can’t remove is an error that names it. The pinned key stays, so the Upgrade agent command with updates on turns them on again. It’s refused while a build is being applied or tried, and while a rollback is putting the previous build back; it ends a rollback that only waits for the agent’s service to start (When a host rolls back). Where the directory above the agent’s state directory could be changed by another account, it deletes nothing and tells you the staged files are yours to delete; see Agent CLI.
Every verb but status needs root. See Agent CLI for what each prints.
To change one thing a host agreed to, run setup on it with only that flag and no --updates: --update-key-sha256 re-pins, --update-track changes the releases it takes, and --update-window replaces its windows. It keeps the rest, including a pause, and refuses a host that agreed to nothing. See Change what a host agreed to.
Turn off agent updates
Section titled “Turn off agent updates”In Settings → Agent updates, choose Turn off… and enter your password. It’s refused while an update rollout is running: cancel it, or choose Stop all updates, first. Hosts keep the consent they gave and the build they run. The key, who holds it and a stop are kept, so turning updates on again with the same key needs no re-pinning. While updates are off, Vectory doesn’t read or keep what hosts report about updates, and it deletes what it had: each host reports again at its next check-in once you turn updates on. A device that was still finishing an update gets its waiting time again from the moment you turn them on, so it isn’t failed for the time they were off.
Limits
Section titled “Limits”- No major track. A host takes patch releases, or minor releases too. A new major version needs an upgrade by hand.
- Custody is fixed while updates are on. To change who holds the key, turn updates off and on again. Hosts pinned to the old key then need their Upgrade agent command.
- A release names only the platforms in this server’s catalog. A host whose platform isn’t in it is listed as Not in this release: update it by hand.
- Updates only move forward. A host never takes an older build. Going back is its own automatic rollback, or an upgrade by hand.
- Turning updates off forgets which releases a host tried. The record of the highest counter a host tried for each key it pins is kept in the update step’s directory, which
vectory update offandservice-uninstallremove. Turned on again, the host takes a release it took back before if a server offers it, and the trial and the rollback guard it as they do any build. A release older than the build the host runs is still refused. - A rollout targets the devices the review found. A device that joins a group afterwards isn’t added, and a device is in at most one unfinished update rollout.
- At most 200 update rollouts are active or paused at once. The server reads every active one every two seconds, so the 201st is refused (
UPDATE_ROLLOUT_LIMIT) until you cancel one or one finishes. A rollout takes up to 10,000 devices, so this is no limit on the fleet. - Expiry uses each host’s clock. A host whose clock is far behind accepts a release that has expired, and one far ahead refuses valid ones.
- Vector isn’t updated. Agent updates replace the agent only. Replacing Vector stays a local act: Replace the Vector binary.
Who can do what
Section titled “Who can do what”| Action | Roles |
|---|---|
| Read the settings, keys, releases, rollouts and each device’s update state | Everyone who signs in |
| Turn updates on or off, rotate, roll over or revoke a key | Administrators, with their password |
| Prepare a release, upload its signature, withdraw it, clear a stop | Administrators |
| Review, start, pause, resume or cancel a rollout, and Stop all updates | Operators and Administrators |
Each change is recorded in the audit log, and notifications can tell you when a rollout stops, a device rolls back, updates are stopped or the key changes.
- Alerts and notifications: hear about rollbacks and stops.
- Troubleshooting: when a device doesn’t update.
- Security model: what each side can and can’t do.
- Agent CLI: the
vectory updatecommands on a host, and thevectory releasecommands for keys and signatures.