[PR #8] [MERGED] installer: ask for the Wolf CT id, and check it across the whole cluster #7

Closed
opened 2026-10-15 12:52:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/proxmox-community-script/pull/8
Author: @JBailes
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/10/2026
Merged by: @JBailes

Base: main ← Head: feat/installer-pin-wolf-ctid


📝 Commits (1)

  • 4943453 installer: ask for the Wolf CT id, and check it across the whole cluster

📊 Changes

6 files changed (+170 additions, -25 deletions)

View changed files

📝 .env.example (+7 -0)
📝 README.md (+21 -2)
📝 docker-compose.yml (+5 -0)
📝 install.sh (+56 -4)
📝 tests/gather-dryrun.sh (+67 -19)
📝 tests/state-volume-dryrun.sh (+14 -0)

📄 Description

pct create refuses a CT id that any node in the cluster owns, but the daemon's own allocator (LXC2Docker internal/lxc/manager.go, usedVMIDs) only globs this node's /etc/pve/lxc and /etc/pve/qemu-server. On a cluster it therefore hands out ids a peer holds, and the create fails with

manager: pct create 103 from tarball: CT 103 already exists on node 'pve1'

which reaches the user as a Wolf container that restarts forever, climbing one id per attempt, with nothing on screen naming the cause.

The installer now asks for the id up front. The default is the lowest id no guest owns and a taken id is refused — both checked against /etc/pve/nodes/*/lxc and /etc/pve/nodes/*/qemu-server, i.e. every node, not just this one. The choice is written to .env as WOLF_CTID and passed to the daemon as the dld.vmid label on the wolf service. The state volume's 9000+ id search had the same local-only blind spot and now reuses the same check.

Depends on a matching LXC2Docker change. The daemon has no dld.vmid label today and always takes the lowest free id it can see, so until that lands the label is inert and the prompt only documents the id Wolf will get. The companion PR adds the label and fixes usedVMIDs() to see every node — which is also what stops session CTs colliding.

Tested with the repo's dry-run harnesses against a faked two-node cluster (this node owns CT 100, the peer owns CT 101 and VM 102): gather 38, state-volume 21, nvidia-cdi 19, uninstall 26 — all passing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/proxmox-community-script/pull/8 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 8/10/2026 **Status:** ✅ Merged **Merged:** 8/10/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `main` ← **Head:** `feat/installer-pin-wolf-ctid` --- ### 📝 Commits (1) - [`4943453`](https://github.com/games-on-whales/proxmox-community-script/commit/4943453273b48ef286e9518246ab9a8be66a8e32) installer: ask for the Wolf CT id, and check it across the whole cluster ### 📊 Changes **6 files changed** (+170 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+7 -0) 📝 `README.md` (+21 -2) 📝 `docker-compose.yml` (+5 -0) 📝 `install.sh` (+56 -4) 📝 `tests/gather-dryrun.sh` (+67 -19) 📝 `tests/state-volume-dryrun.sh` (+14 -0) </details> ### 📄 Description `pct create` refuses a CT id that any node in the cluster owns, but the daemon's own allocator (LXC2Docker `internal/lxc/manager.go`, `usedVMIDs`) only globs this node's `/etc/pve/lxc` and `/etc/pve/qemu-server`. On a cluster it therefore hands out ids a peer holds, and the create fails with ``` manager: pct create 103 from tarball: CT 103 already exists on node 'pve1' ``` which reaches the user as a Wolf container that restarts forever, climbing one id per attempt, with nothing on screen naming the cause. The installer now asks for the id up front. The default is the lowest id no guest owns and a taken id is refused — both checked against `/etc/pve/nodes/*/lxc` and `/etc/pve/nodes/*/qemu-server`, i.e. every node, not just this one. The choice is written to `.env` as `WOLF_CTID` and passed to the daemon as the `dld.vmid` label on the wolf service. The state volume's 9000+ id search had the same local-only blind spot and now reuses the same check. **Depends on a matching LXC2Docker change.** The daemon has no `dld.vmid` label today and always takes the lowest free id it can see, so until that lands the label is inert and the prompt only documents the id Wolf will get. The companion PR adds the label and fixes `usedVMIDs()` to see every node — which is also what stops session CTs colliding. Tested with the repo's dry-run harnesses against a faked two-node cluster (this node owns CT 100, the peer owns CT 101 and VM 102): gather 38, state-volume 21, nvidia-cdi 19, uninstall 26 — all passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/proxmox-community-script#7
No description provided.