Skip to content

fix(reinstall): remove redundant disk resize causing 500#144

Merged
v0l merged 1 commit into
masterfrom
fix/reinstall-double-resize
Jun 23, 2026
Merged

fix(reinstall): remove redundant disk resize causing 500#144
v0l merged 1 commit into
masterfrom
fix/reinstall-double-resize

Conversation

@v0l

@v0l v0l commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

/api/v1/vm/{id}/re-install returned 500 InternalServerError.

Root cause

The reinstall pipeline (introduced in "feat: pipeline reinstall") ran two disk steps:

  1. import_template_disk — which already does import_disk + resize_main_disk, resizing the primary disk to the full template size.
  2. A redundant resize_disk step — asking Proxmox to resize the disk to that same size.

Proxmox only permits growing a disk; resizing to a size that isn't strictly larger is rejected as a disallowed shrink, which surfaces as a generic 500. The original pre-pipeline reinstall_vm never had this extra resize, so this was a regression.

Fix

Removed the redundant resize_disk step. The pipeline is now: stop → unlink → import+resize → start, matching the original behaviour.

Fixes #142

The reinstall pipeline ran import_template_disk (which already imports AND
resizes the primary disk to the template size) followed by a separate
resize_disk step. The second resize asks Proxmox to resize to the same
size, which it rejects as a disallowed shrink, surfacing as a generic 500.

Removes the redundant resize_disk step, restoring the original pre-pipeline
reinstall behaviour.

Fixes #142
@v0l v0l merged commit 1c80795 into master Jun 23, 2026
6 of 7 checks passed
@v0l v0l deleted the fix/reinstall-double-resize branch June 23, 2026 13:45
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.

/re-install on active VM returns InternalServerError

1 participant