Repository navigation
feat(servers): retry a failed install - #171
Merged
Merged
Conversation
Two problems surfaced by reinstalling a server whose install had failed: - rebuild() always stopped and deleted the old VM first. When the failed install died before or during the clone there is no VM, Proxmox answers the stop with "does not exist", and the chain fails every time. It now skips straight to the build when isVmDeleted() says the VM is gone. If that check is wrong because the VM does exist, the clone refuses the VMID and nothing is lost. - The chain's catch wrote install_failed through the server captured at dispatch. That copy is serialized with the chain, and when it already read install_failed -- a retry starts from exactly that -- Eloquent saw nothing dirty and skipped the write, leaving the server on "installing" forever. It now updates by ID.
A failed install was a dead end: the client showed "contact your administrator" and the API refused every settings route with 409. The screen now carries the reinstall form (template, a new OS password, start after install), and AuthenticateServerAccess lets install_failed servers through to the two routes it needs -- the template list and reinstall. Any other blocked state, like suspended, still gets 409. ReinstallServerCard takes an optional title, description and button label so the same form serves both places. Tested with Pest (the missing-VM chain, the stale-status catch, and that other states stay blocked), a Playwright spec against a seeded install_failed server, and a real retry on a Proxmox node of a server whose VM was never created.
Contributor License AgreementAll identified human contributors have signed the current CLA. |
This was referenced Oct 16, 2026
The "Installing", "Restoring Backup" and "Restoring Snapshot" screens only ever change when a queued job finishes, but nothing told the page: it stayed on the screen until the user refreshed. ServerRouter now re-fetches the server every 5s while it's in one of those states, so the screen moves on as soon as the work is done -- including straight after retrying a failed install. A failed poll is simply retried on the next tick. ScreenBlock takes a `spin` flag, used by those three screens, that turns the icon slowly (2s per turn, off for reduced motion) to show it's live. The icon's border box moves to a wrapper so only the glyph turns. The retry e2e spec now fakes the install finishing and expects the page to leave "Installing" without a reload; it fails without the polling.
# Conflicts: # CHANGELOG.md
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.
Until now a failed install was a dead end. Users saw "Install failed. Please contact your administrator.", and the API refused every settings route with 409.
Changes
AuthenticateServerAccessletsinstall_failedservers reach only the template list and reinstall routes. Suspended servers and other states still get 409.install_failed, so Eloquent saw no change and skipped the write. It now updates by ID.Testing
serializeAndRestore(), which serializes jobs the way the real queue does), and that blocked states stay blocked. The two bug tests fail on the old code.install_failedserver. It fails on the old UI. It also fakes the install finishing and expects the page to leave "Installing" without a reload, which fails without the polling.Notes
CHANGELOG.md, so whichever merges second will conflict there.rebuild()should switch fromisVmDeleted()to its strictervmExists().