Upgrade Guide: v0.11 to v0.12¶
v0.12 lets an account service answer credential requests for the users it lists, replaces the desktop app's Provisioning pane with a Credentials view, and moves the provision contract to version 2.
On a directory server, a pinned machine stops delivering the moment the server is upgraded
On a server with auth.directory, every user the account service lists has no binding in v0.12: at start the server removes each binding whose user is not a local admin and logs each removal. From then on a create or shed provision for those users asks the account service and nothing else, with no fallback to a machine. A machine that delivered to a directory user on v0.11 does not deliver after the upgrade, and the user's delivery.toml is not used for them. Put each person's values into the account service first, then upgrade. Local admins named in the server's own config keep their pinned machine. See Credentials from the account service.
Upgrade the server and the desktop app together
The provision contract is now version 2. A v0.11 desktop app cannot answer a v0.12 server's requests, and a v0.12 app does not speak version 1 to a v0.11 server. Move both in the same window.
Order¶
- Deploy the account service version that offers delivery, and store each person's values in it.
- Upgrade every shed server and every desktop app, together.
- Open the desktop app's Credentials view on each machine and check who answers on each server.
A server with no auth.directory needs no step 1.
What the Credentials view replaces¶
The app's sidebar gains a fifth entry, Credentials, between Agents and Activity. Preferences keeps General and Terminal; its Provisioning, Source machine and Preview sections are gone, and nothing in delivery.toml changes. The view has four parts: where each server gets your credentials, what this machine gives, Check (what a shed would get), and the answers this machine gave. See Credentials.
- Use this machine is now Answer from here, and there is a new Stop answering from here (the app's
shed source unbind). A stop sticks: the app records the server inpaused-servers.jsonbesidemachine.jsonand does not reconnect there until you press Answer from here. Before, an unbind was undone within seconds, because the server binds the first machine to connect. - A provider cannot be turned on until its required fields are filled. The bare on/off switch is gone: use Set up and Turn off.
- Scope is "every server this machine answers on" (no
only.servers) or a ticked list. A provider scoped to every server still delivers to any configured server that asks; tick the servers you trust. - Check says before it runs which commands it will run (
gh, a passphrase command). - A server where the account service answers for you has no action in the view.
- IPC:
ui.prefs_section,ui.press_delivery_toggleandui.preview_deliveryare removed; see the IPC page for the new ops.
Where a shed's user came from¶
Each shed now records whether its user was local or from the directory (user_origin), on every backend. A delivery to a shed whose user's name has since moved between the two sets is refused:
| Status | Code | What to do |
|---|---|---|
409 |
SHED_ORIGIN_CHANGED |
The name moved between the local admins and the account service. Create a new shed. Nothing was requested and the record is unchanged. |
409 |
SHED_ORIGIN_UNKNOWN |
The shed has no known origin. No credentials are delivered to it: recreate it (shed assign does not help, it refuses a shed that has a user). A shed made before v0.12 is recorded by the first successful origin migration on v0.12 (until a start records that decision nothing is stamped, and the next start decides again; once it is recorded, a shed whose stamp failed is stamped from it at a later start); one made after that by an older shed-server (a rollback) stays unknown for good. |
Sheds made before v0.12 are stamped once, by the first start whose origin migration succeeds, from that start's configuration, and the decision is recorded in <state_dir>/delivery/origin-migration.json. A start that records no decision (the sheds could not be listed, or the file could not be written and was removed) stamps nothing, and the next start decides again, from its own configuration; if a failed write left the file in place, that file is the decision. Once the decision is recorded, a shed whose own stamp failed stays unstamped (refused deliveries) until a later start stamps it from the file. Later starts stamp from that file, never from the current configuration. Do not edit or delete it. Put differently: decide who is a local admin and who is a directory user before the first v0.12 start.
Cloud sheds carry the origin as a shed_user_origin label on the VM, written at create and when a shed is assigned. A cloud shed recovered or adopted from a VM that has no such label is recorded unknown and gets no delivery until it is recreated. See Remote backend.
Before you upgrade¶
- The upgrade is one way. Do not roll a server back to v0.11 after its first start on v0.12: the origin migration file is written once (at the first successful migration), the bindings of directory users are removed, and a shed made by a v0.11 binary after that is
unknownfor good. - Pointing
auth.directory.urlat a different account service keeps sheds recordeddirectory. Start that server from fresh state. - Upgrade the account service first. A directory server upgraded before the service delivers is silent to its users: their deliveries end
not_applicable, andshed source statusand the server log say why. Deploy the service and its stored values before the server. - Cloud sheds made by v0.11 carry no origin label. If the server's state directory is lost they become
unknownand must be recreated.