mirror of
https://github.com/games-on-whales/proxmox-community-script.git
synced 2026-10-15 13:01:47 +00:00
[PR #2] [MERGED] installer: fix the state volume against a real PVE node #4
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/proxmox-community-script#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/proxmox-community-script/pull/2
Author: @JBailes
Created: 8/9/2026
Status: ✅ Merged
Merged: 8/9/2026
Merged by: @JBailes
Base:
main← Head:fix/installer-state-volume-real-vmid📝 Commits (1)
5dd2a2dinstaller: fix the state volume against a real PVE node📊 Changes
2 files changed (+72 additions, -22 deletions)
View changed files
📝
install.sh(+49 -20)📝
tests/state-volume-dryrun.sh(+23 -2)📄 Description
Verified the state-volume section on a live Proxmox 9.2.6 host (
local-lvm/ lvmthin) rather than stubs alone. Two defects surfaced, one of them data loss — neither visible to the fakedpvesm.1.
vmid 0does not existAllocation failed on the very first real call. The volume now takes the first free id from 9000 upward (no
qemu-server/orlxc/config for it), clear of the ids the daemon hands to session CTs, overridable withWOLF_STATE_VMID. It is found again by itswolf-statesuffix whatever id owns it, and the resolved volid is written to.envasWOLF_STATE_VOLUMEso a re-run adopts exactly that one.2. Stale content under the mount point overwrote live data
The migration copied
/etc/wolfonto the volume unconditionally and never emptied the mount point afterwards. Once Wolf owns the volume, whatever remains underneath is stale — so any later run (after an unmount, or a reboot before fstab mounts) copied it back over the top, rollingconfig.tomland client pairings backwards.Seeding now happens only onto an empty volume, and the mount point is emptied once the copy succeeds.
Red before green, on hardware:
CONFIG-NOW: STALE-CONFIG❌CONFIG-NOW: LIVE-CONFIG✅Verification
The full section ran end to end on the node — allocate →
mkfs→ migrate → mount → fstab by UUID — plus re-runs both mounted (short-circuits) and unmounted (reuses the volume, does not reformat, does not clobber). Confirmed directly that a blank volume givesblkid -prc=2 and a formatted one rc=0, which is what the no-reformat guard keys off.Every artefact was removed afterwards: volume freed, scratch dir and scripts deleted,
pvesm listclean.tests/state-volume-dryrun.shgrows both regressions (15 assertions):vmid 0is never passed topvesm alloc, and a populated volume is left alone rather than overwritten from the mount point.tests/gather-dryrun.sh14/14 unchanged.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.