proxmox: review fixes, real-host validation record, changelog
Phase 10. Two review passes (go-operator-reviewer, /code-review high) over the branch, recorded in docs/reviews/2026-09-23-proxmox-provider-review/: 9 findings fixed, 3 accepted as documented limits, 7 rejected with a reason. - Delete removes the seed between the stop and the destroy, so a failed seed delete leaves the VM for the next Delete instead of leaking the ISO; a Permanent refusal on the every-node path fails the call. - Create skips a probe VMID whose listed name is someone else's without waiting on its lock. - The three answers Phase 0 never captured are fixtures now: a missing storage is a 400 (the Checker reports StorageNotFound), a hibernated VM is destroyable (Delete destroys ours), a paused VM stops. - TestProxmox_lifecycle and TestProxmoxCheck_realHost passed on pv1-1 (PVE 9.2.20); the docs record the run and drop "not yet run". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -248,10 +248,22 @@ func TestCreate_takenVMIDInspectedBeforeProbing(t *testing.T) {
|
||||
wantConfigReads int
|
||||
}{
|
||||
{
|
||||
name: "foreign VM probes on after its config is read",
|
||||
name: "foreign VM probes on without a read",
|
||||
setup: func(fx *fixture) { fx.fake.addVM(slot(0), "someone-else", "running") },
|
||||
wantAttempt: 1,
|
||||
wantConfigReads: 2,
|
||||
wantConfigReads: 1,
|
||||
},
|
||||
{
|
||||
// Review finding P2: another VM's lock (a backup, a snapshot)
|
||||
// can outlast the clone budget, and every retry lands on the
|
||||
// same VMID.
|
||||
name: "foreign VM under a lock probes on without waiting",
|
||||
setup: func(fx *fixture) {
|
||||
fx.fake.addVM(slot(0), "someone-else", "running").lock = "snapshot-delete"
|
||||
fx.p.budgets.clone = 2 * time.Second
|
||||
},
|
||||
wantAttempt: 1,
|
||||
wantConfigReads: 1,
|
||||
},
|
||||
{
|
||||
name: "container probes on without a read",
|
||||
@@ -581,8 +593,8 @@ func TestCreate_vmidRangeExhaustedIsTransient(t *testing.T) {
|
||||
if got := fx.fake.callCount("Clone"); got != 0 {
|
||||
t.Errorf("Clone calls = %d, want 0", got)
|
||||
}
|
||||
if got := fx.fake.callCount("VMConfig"); got != 5 {
|
||||
t.Errorf("VMConfig calls = %d, want the template and each of the 4 VMIDs once", got)
|
||||
if got := fx.fake.callCount("VMConfig"); got != 1 {
|
||||
t.Errorf("VMConfig calls = %d, want only the template's: the listed names are foreign", got)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user