Skip to content

feat: update a live platform and recreate a single node - #44

Merged
TeddyAndrieux merged 3 commits into
mainfrom
improvement/update-a-live-platform
Oct 15, 2026
Merged

TeddyAndrieux merged 3 commits into
mainfrom
improvement/update-a-live-platform

Conversation

@TeddyAndrieux

Copy link
Copy Markdown
Contributor

This PR lets you change a platform while it is running. You can switch it offline, or take a single node away and bring it back, without respawning anything.

Changes

  • Machines keep their image. Image names were resolved to the latest image on every pulumi up, so any update of a live platform could replace every machine once a newer image was published. The image is now only read when a machine is created.
  • New update action. It applies configuration keys to an existing stack, starting from the configuration it was last deployed with. It works from any job, not only the one that spawned.
  • New absent_nodes config key. For example, absent_nodes: [node-2] destroys node-2's instance and volumes but keeps its addresses. Removing it from the list brings node-2 back as a new, blank machine at the same addresses. Other machines are not touched.
  • Host keys are recorded per machine instead of per address, so a node that comes back does not trigger a "host identification has changed" warning.
  • Snapshots are refused when a node in the middle of the numbering is absent.

Behaviour change

Changing instance_image, bastion_image, restore_snapshot or instance_image_file on a live platform no longer replaces its machines.

Tests

A new e2e workflow runs on AWS and OpenStack:

  1. Spawn the platform.
  2. Switch it offline and check that no machine was replaced.
  3. Take node-2 away, then bring it back.
  4. Check that node-2 is a new, blank machine at the same IPs, with no host key warning, and that the other machines are unchanged

An image name is resolved again on every update, to the latest image
of that name. Once the cloud publishes a newer one, any update of a
live platform replaced every machine, the bastion included, whatever
it was about. Toggling `offline` was enough to trigger it.

The image is now only read when a machine is created. This is also a
prerequisite for recreating a single node of a live platform, which
goes through such an update.
The action could only spawn a platform or destroy it. Any change, even
switching it offline, meant spawning another one and losing what ran
on the first.

`update` takes the configuration the platform was last deployed with,
merges the keys it is handed and brings the platform up again. It
writes the SSH files back from the stack first. This lets it run from
another job than the spawn, where the key the update waits through is
missing.

An end to end test switches a platform offline on each provider. It
checks that the platform is cut off and that no machine was replaced.
Testing how a product survives the loss of a server, and its
replacement, needs that one machine gone while the others keep running.
Lowering `instance_count` only ever removes the last node, and spawning
again loses everything.

`absent_nodes` names the nodes to leave out. Such a node keeps its
interfaces, and with them its addresses. Its instance and volumes go
away. Taking it out of the list brings it back blank, where it was.

The SSH files now file a host key under the machine rather than its
address. A node brought back at its old address would otherwise clash
with the key of the one it replaces, here and on the bastion. The
bastion is handed its config again whenever the machines change.

A snapshot of a platform missing a node in the middle of its numbering
is refused, since it could never be spawned back.

The update end to end test takes node-2 away and brings it back. It
checks that the node is a new, blank machine at its old addresses and
that nothing else moved.
@TeddyAndrieux
TeddyAndrieux marked this pull request as ready for review October 12, 2026 16:03
@TeddyAndrieux
TeddyAndrieux requested a review from a team as a code owner October 12, 2026 16:03
@TeddyAndrieux
TeddyAndrieux requested a review from a team October 15, 2026 04:21
@TeddyAndrieux
TeddyAndrieux merged commit 6f95c51 into main Oct 15, 2026
14 checks passed
@TeddyAndrieux
TeddyAndrieux deleted the improvement/update-a-live-platform branch October 15, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants