[PR #49] [MERGED] feat(pve): explicit LAN IP via gow.lan.ip + fix create/GC reap race #52

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

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/49
Author: @JBailes
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @JBailes

Base: main ← Head: fix/pve-lan-ip-and-create-race


📝 Commits (1)

  • 0ed1296 feat(pve): explicit LAN IP via gow.lan.ip + fix create/GC reap race

📊 Changes

5 files changed (+36 additions, -2 deletions)

View changed files

📝 internal/api/containers.go (+1 -0)
📝 internal/lxc/config.go (+4 -0)
📝 internal/lxc/manager.go (+1 -1)
📝 internal/lxc/network.go (+15 -0)
📝 internal/lxc/pve_tarball.go (+15 -1)

📄 Description

Summary

Two PVE-mode fixes found while deploying games-on-whales Wolf as a Proxmox CT.

1. Explicit LAN IP via gow.lan.ip

Dual-NIC LAN containers derived their IP solely from the VMID (<prefix>.<vmid>). Because Proxmox VMIDs are >=100, the LAN IP could never be below x.x.x.100, colliding with networks that reserve the high host range. A new gow.lan.ip label overrides the derived address — bare IP inherits the bridge subnet, CIDR is used as-is, unset keeps the old behaviour (backward-compatible).

2. Create/GC reap race

createPVEFromTarball only recorded the VMID in the store after the multi-second pct create. During that window the record had VMID==0 in the "exited" state, so the periodic gc() removed it mid-create and the subsequent start failed with "No such container" (intermittent run failures). The VMID is now persisted immediately after allocation, so gc() treats it as a Proxmox CT and skips it.

Test

build + test pass. Verified live on a PVE 9.2 host: Wolf CT created reliably with a LAN IP of 192.168.1.50 (VMID 104), Moonlight reachable, no mid-create reaping.


🔄 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/LXC2Docker/pull/49 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `main` ← **Head:** `fix/pve-lan-ip-and-create-race` --- ### 📝 Commits (1) - [`0ed1296`](https://github.com/games-on-whales/LXC2Docker/commit/0ed129648368896fc5cf2ecbdcd3b75799859527) feat(pve): explicit LAN IP via gow.lan.ip + fix create/GC reap race ### 📊 Changes **5 files changed** (+36 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/api/containers.go` (+1 -0) 📝 `internal/lxc/config.go` (+4 -0) 📝 `internal/lxc/manager.go` (+1 -1) 📝 `internal/lxc/network.go` (+15 -0) 📝 `internal/lxc/pve_tarball.go` (+15 -1) </details> ### 📄 Description ## Summary Two PVE-mode fixes found while deploying games-on-whales Wolf as a Proxmox CT. ### 1. Explicit LAN IP via `gow.lan.ip` Dual-NIC LAN containers derived their IP solely from the VMID (`<prefix>.<vmid>`). Because Proxmox VMIDs are `>=100`, the LAN IP could never be below `x.x.x.100`, colliding with networks that reserve the high host range. A new `gow.lan.ip` label overrides the derived address — bare IP inherits the bridge subnet, CIDR is used as-is, unset keeps the old behaviour (backward-compatible). ### 2. Create/GC reap race `createPVEFromTarball` only recorded the VMID in the store **after** the multi-second `pct create`. During that window the record had `VMID==0` in the "exited" state, so the periodic `gc()` removed it mid-create and the subsequent start failed with "No such container" (intermittent run failures). The VMID is now persisted immediately after allocation, so `gc()` treats it as a Proxmox CT and skips it. ## Test `build` + `test` pass. Verified live on a PVE 9.2 host: Wolf CT created reliably with a LAN IP of `192.168.1.50` (VMID 104), Moonlight reachable, no mid-create reaping. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:51:38 +00:00
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/LXC2Docker#52
No description provided.