Repository navigation
feat: update a live platform and recreate a single node - #44
Merged
Merged
Conversation
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.
m4nch0t
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.updateaction. 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.absent_nodesconfig 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.Behaviour change
Changing
instance_image,bastion_image,restore_snapshotorinstance_image_fileon a live platform no longer replaces its machines.Tests
A new e2e workflow runs on AWS and OpenStack: