Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/self-host/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Each step checks what you did before it moves on. When a check fails, fix it and

**The update says it can't install yet.** **Install health** on **Settings, then System** lists the check that stops it (marked **Stops updates**), with its fix. Press **Re-run checks** after fixing it. **Update to vX needs your action** is the model check instead: fix the model access, then **Re-run the model check**.

**The update waits: "needs your OK", "ready to apply" or "needs an AWS admin".** It is prepared and waits for a person. **Review and apply** lists the data or permission changes to confirm; **Apply vX** applies it; **needs an AWS admin** means it changes the deploy role or a permissions boundary, so someone with administrator rights executes it in the AWS console. Admins get one email when it starts waiting, and one reminder after 7 days. See [The page, state by state](./updates.md#the-page-state-by-state).
**The update waits: "would replace or remove data", "ready to apply" or "needs an AWS admin".** It is prepared and waits for a person. **Replace the data and apply** applies an update after the card has listed the data it replaces or removes; **Apply update** applies one the maintenance window held; **needs an AWS admin** means it changes the deploy role or a permissions boundary, so someone with administrator rights executes it in the AWS console. Admins get one email when it starts waiting, and one reminder after 7 days. See [The page, state by state](./updates.md#the-page-state-by-state).

**"This update was prepared without the deploy role".** The install runs v0.8.28 to v0.8.38, whose apply check was wrong. Execute that one change set in the CloudFormation console; from v0.8.39 on, updates apply from the page. See [Installs on v0.8.28 to v0.8.38](./updates.md#installs-on-v0828-to-v0838).

Expand Down
13 changes: 8 additions & 5 deletions docs/self-host/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ The **Version** section of **Settings, then System** shows one state at a time,
| **You're up to date** | No newer release on your channel. With automatic updates on, it says when the next one would install. | Nothing. **Check for updates** reads GitHub now. |
| **Updated to vX** | An update finished in the last day. | Nothing. |
| **vX is available** | A newer release is out; its notes are below. **Major release** means its notes ask you to do something first; **Beta** means a nightly build on the Beta channel. | **Update to vX**. |
| **Checking vX before it can be applied** | The release check runs: the signature, the checksums, then a test call to each model the release calls. It usually takes about 5 minutes. | Nothing. The page moves on by itself. |
| **Checking vX before it can be applied** | The release check runs: the signature, the checksums, then a test call to each model the release calls. It usually takes about 5 minutes. If you pressed **Update**, the card says who pressed it and when: the update starts by itself once the check passes, exactly as if you pressed again. | Nothing. The page moves on by itself. |
| **Checking vX didn't finish** | The release check stopped without an answer, or has had none for 30 minutes. It says why. Nothing changed. | **Check again**. |
| **Update to vX needs your action** | A model the release calls doesn't answer here yet ([the model check](#the-model-check)). | Fix it in the AWS console, then **Re-run the model check**. |
| **Preparing the update to vX…** | AWS prepares the change to your stack, which takes a minute or two. | Nothing. If it would change data or permissions, it asks you first. |
| **vX needs your OK** | The prepared update would replace or remove data or change permissions, and waits for you ([Update now](#update-now)). | **Review and apply**: check the listed changes, then confirm. |
| **vX would replace or remove data** | The prepared update would replace or remove data, and waits for you ([Update now](#update-now)). | **Replace the data and apply**, once you've read what it lists. |
| **vX is ready to apply** | Prepared and waiting: the maintenance window held it because it changes what CoderHelm's own roles may do, or auto-update was turned off before it ran. | **Apply update**. |
| **vX is ready to apply** | The prepared update waits for an admin, for example because automatic updates were turned off before it ran. | **Apply vX**. |
| **vX needs an AWS admin** | The update changes the deploy role or a permissions boundary, which CoderHelm can't apply for itself ([why](#what-an-update-does)). | **Open it in the AWS console**: someone with administrator rights reviews it and chooses **Execute**. |
| **Applying vX…** / **Updating to vX…** | The update runs (10 to 20 minutes), with who started it and when. When someone executed it in the AWS console, it says so. Coderhelm keeps running your current version until it finishes. | Nothing. The page follows it. |
Expand Down Expand Up @@ -147,7 +148,7 @@ Some releases need you to say yes first. When the prepared update would replace

### Installs on v0.8.28 to v0.8.38

On these releases, **Review and apply** and **Apply vX** refuse every prepared update with "this update was prepared without the deploy role", even though the change set was made with it: the check read a field AWS never returns. v0.8.39 fixed it. To get onto v0.8.39 or newer once, when the page refuses:
On these releases, applying from the page (then called **Review and apply** and **Apply vX**) refused every prepared update with "this update was prepared without the deploy role", even though the change set was made with it: the check read a field AWS never returns. v0.8.39 fixed it. To get onto v0.8.39 or newer once, when the page refuses:

1. Open the link next to the update (**See the change in the AWS console**), or the stack `coderhelm-<name>` in the [CloudFormation console](https://console.aws.amazon.com/cloudformation/home), then **Change sets**, then the newest one.
2. Check what it changes, and choose **Execute change set**. It runs through the deploy role it was made with.
Expand All @@ -162,13 +163,15 @@ On an install made with Launch Stack, an update is a stack update of `coderhelm-
2. **Checks the models** the release calls ([the model check](#the-model-check)).
3. **Prepares the change set.** The updater downloads `coderhelm.json` from `https://coderhelm-public.s3.amazonaws.com/launch/<version>/`, where release files are written once and never replaced, and proposes it only if its sha256 matches the signed one. First the install helper copies the release's part templates into the install's own release bucket, each checked against the sha256 that verified `coderhelm.json` lists, so CloudFormation can read them while it prepares the parts' own change sets. Every parameter keeps its current value. After CloudFormation reads the template, the updater compares what it read with the verified one, and runs nothing if they differ.
4. **Applies it, through the deploy role.** **Settings, then System** shows the change set's summary while it runs: how many resources are added, changed and removed, which ones are replaced, which parts it touches, and a link to it in the CloudFormation console if you want to look.
- **You pressed Update:** it applies as soon as it is prepared. When it would replace or remove data or change permissions, it waits for you to confirm exactly those changes on the page, then applies.
- **You pressed Update:** it applies as soon as it is prepared. The card says next to the button that one press includes any change to what CoderHelm's own roles may do; those always stay inside the install's permissions boundary, and the deploy role can't change itself or the boundary. When it would replace or remove data, it stops: the card lists what it replaces or removes, in words, and **Replace the data and apply** applies exactly those changes (if they changed since the page showed them, it asks again). The raw CloudFormation list is under **Technical details**.
- **The maintenance window started it (auto-update on):** it applies by itself, except when it would replace or remove data or change permissions: then it waits, admins get an email, and you confirm it on the page the same way. If auto-update was turned off before it ran, it waits for you to press **Apply**.
- **It changes the deploy role or a permissions boundary:** the deploy role can't change those (that is what keeps it from giving itself more), so CoderHelm can't apply it for you. The page says so and links to the change set: someone with administrator rights in the AWS account reviews it and chooses **Execute**. Releases do this rarely, and their notes say so.
5. **Follows it.** The updater reads the change set and the stack every 5 minutes until the update ends, and again each time **Settings, then System** asks, so the page never shows an older state than CloudFormation's. An update executed outside the app (in the AWS console or the AWS CLI) is followed the same way, and the history records it as applied in the AWS console. Before it calls the update a success, it checks that the stack reports the new release. When the stack update starts, the install's own copy step checks every file of the release against the sha256 that `coderhelm.json` lists before any part changes. If a part fails, CloudFormation rolls the whole stack back to the previous release by itself.
6. **Reports.** The history in **Settings, then System** shows the version, when, who (or "auto") and the result: succeeded, failed, or rolled back. A try that didn't succeed says in plain words what happened, where your install is now and what to do next; CloudFormation's own text (for the first resource that failed) is under **Technical details**. Admins get an email when it failed or rolled back; a finished update is only in the history.

A change set that waits too long can go stale (the stack changed since it was made); the history then says so, and **Update** prepares a new one. Pressing **Update** while an older prepared update waits replaces it (nothing was changed by the older one), and the history lists the older one as **Replaced**. Pressing it while AWS still prepares or already applies an update is refused, with the reason.
A change set that waits too long can go stale (the stack changed since it was made); the history then says so, and **Update** prepares a new one. Pressing **Update** while an older prepared update waits replaces it (nothing was changed by the older one), and the history lists the older one as **Replaced**. Pressing it while AWS still prepares or already applies an update is refused, with the reason; pressing it again for the update already in progress just shows that update.

Pressing **Update** while the release check still runs is never an error: the press is recorded (who, which version, when), the card shows **Checking vX before it can be applied**, and the update starts by itself once the check passes. If the check fails, the card says why. Pressing again, or a newer release coming out meanwhile, replaces the waiting press: **Update** always means the newest release. While an update is checked, prepared or applied, a newer release is only mentioned on the card ("it's next after this one"); it is offered once the current one finishes.

### The first update onto a release with the deploy role on every install

Expand Down
Loading
Loading