fix: use shared host mount for answer files + rename to pve-integration

WORK_DIR now defaults to /opt/pve-integration/work (under the shared
host mount) instead of /tmp/pve-integration (container-local).

This fixes the answer server seeing empty answer files — the dev-infra
container writes answer files to WORK_DIR, and the answer server
container (a sibling) needs to read them from the same host path.

Also:
- Renamed mount from /opt/pve-isos to /opt/pve-integration
- Added must_run=true, start=true to answer server container
- Updated docker-compose.test.yml and dev.ps1 remote override

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-25 14:49:59 -05:00
parent 53e567f38b
commit 589181e77c
4 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -163,7 +163,7 @@ services:
dev-infra: dev-infra:
volumes: volumes:
- ${RemoteRepoPath}:/repo - ${RemoteRepoPath}:/repo
- /opt/pve-isos:/opt/pve-isos - /opt/pve-integration:/opt/pve-integration
"@ | Set-Content -Path $OverrideFile -Encoding utf8 "@ | Set-Content -Path $OverrideFile -Encoding utf8
$ComposeArgs = @('-f', $ComposeFile, '-f', $OverrideFile) $ComposeArgs = @('-f', $ComposeFile, '-f', $OverrideFile)
@@ -254,7 +254,7 @@ if ($Integration) {
Start-InfraContainer Start-InfraContainer
# Verify environment is ready (config file exists from provisioning) # Verify environment is ready (config file exists from provisioning)
$configCheck = docker exec $InfraContainer bash -c 'test -f "${CONFIG_FILE:-/tmp/pve-integration/config.json}" && echo OK || echo MISSING' $configCheck = docker exec $InfraContainer bash -c 'test -f "${CONFIG_FILE:-/opt/pve-integration/work/config.json}" && echo OK || echo MISSING'
if ($configCheck.Trim() -eq 'MISSING' -and -not $Provision) { if ($configCheck.Trim() -eq 'MISSING' -and -not $Provision) {
throw "Integration environment not ready. Run with -Provision first, or use -Provision -Integration together." throw "Integration environment not ready. Run with -Provision first, or use -Provision -Integration together."
} }
+1 -1
View File
@@ -37,7 +37,7 @@ services:
profiles: [infra] profiles: [infra]
volumes: volumes:
- ..:/repo - ..:/repo
- /opt/pve-isos:/opt/pve-isos - /opt/pve-integration:/opt/pve-integration
# WARNING: Mounting the Docker socket grants this container root-equivalent # WARNING: Mounting the Docker socket grants this container root-equivalent
# access to the host's Docker daemon. Only use on trusted, isolated machines. # access to the host's Docker daemon. Only use on trusted, isolated machines.
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
@@ -46,8 +46,8 @@ INFRA_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
REPO_ROOT="$(cd "$INFRA_DIR/../.." && pwd)" REPO_ROOT="$(cd "$INFRA_DIR/../.." && pwd)"
# ── Defaults ──────────────────────────────────────────────────────── # ── Defaults ────────────────────────────────────────────────────────
CACHE_DIR="${CACHE_DIR:-/opt/pve-isos}" CACHE_DIR="${CACHE_DIR:-/opt/pve-integration}"
WORK_DIR="${WORK_DIR:-${RUNNER_TEMP:-/tmp/pve-integration}}" WORK_DIR="${WORK_DIR:-${RUNNER_TEMP:-$CACHE_DIR/work}}"
CONFIG_FILE="${CONFIG_FILE:-$WORK_DIR/config.json}" CONFIG_FILE="${CONFIG_FILE:-$WORK_DIR/config.json}"
MODULE_ARTIFACT="${MODULE_ARTIFACT:-$REPO_ROOT/publish/netstandard2.0}" MODULE_ARTIFACT="${MODULE_ARTIFACT:-$REPO_ROOT/publish/netstandard2.0}"
PVE_VERSIONS="${PVE_VERSIONS:-9 8}" PVE_VERSIONS="${PVE_VERSIONS:-9 8}"
+5 -3
View File
@@ -1,9 +1,11 @@
# ── Answer server container ────────────────────────────────────────── # ── Answer server container ──────────────────────────────────────────
resource "docker_container" "answer_server" { resource "docker_container" "answer_server" {
name = "pvetest-answer-server" name = "pvetest-answer-server"
image = "slothcroissant/proxmox-auto-installer-server:latest" image = "slothcroissant/proxmox-auto-installer-server:latest"
restart = "unless-stopped" restart = "unless-stopped"
must_run = true
start = true
network_mode = "host" network_mode = "host"