diff --git a/terraria/module.yaml b/terraria/module.yaml index a43dfe3..b3b884a 100644 --- a/terraria/module.yaml +++ b/terraria/module.yaml @@ -2,7 +2,7 @@ apiVersion: gameplane.local/module/v1 name: terraria displayName: Terraria -version: 2.2.1 +version: 2.2.2 game: terraria categories: [Sandbox, Survival, Adventure, Modded] summary: Terraria + tModLoader dedicated server (passivelemon/terraria-docker) with a vanilla/tModLoader version picker and a tModLoader ModPacks volume. Console via container stdin. diff --git a/terraria/specs.md b/terraria/specs.md index 52495d5..bf5f964 100644 --- a/terraria/specs.md +++ b/terraria/specs.md @@ -74,7 +74,7 @@ Declared ports under `spec.ports`: ## 8. Key Invariants & Security - **Network Wake Protocol**: Declares `wakeProtocol: terraria` under `spec.ports[game]` to allow wake-on-traffic. -- **Readiness Probe**: Uses TCP socket probe against port `7777`. +- **Readiness Probe**: An `exec` probe reads `/proc/net/tcp` for a socket listening on port `7777` (`0x1E61`). It never connects: a `tcpSocket` probe's connect-and-close crashes the server (`ObjectDisposedException` in `Netplay.ServerLoop`) and crash-loops the pod. --- diff --git a/terraria/template.yaml b/terraria/template.yaml index 19869d4..babdee9 100644 --- a/terraria/template.yaml +++ b/terraria/template.yaml @@ -92,8 +92,11 @@ spec: probes: readiness: - tcpSocket: - port: game + # Ready once the server LISTENs on 7777 (0x1E61 in /proc/net/tcp). Never + # tcpSocket: the kubelet's connect-and-close crashes the server + # (ObjectDisposedException in Netplay.ServerLoop) and crash-loops the pod. + exec: + command: ["sh", "-c", "grep -qsE ':1E61 [0-9A-F]+:[0-9A-F]{4} 0A' /proc/net/tcp /proc/net/tcp6"] initialDelaySeconds: 30 periodSeconds: 10 failureThreshold: 30 diff --git a/tmodloader/module.yaml b/tmodloader/module.yaml index e23028a..4e1b63f 100644 --- a/tmodloader/module.yaml +++ b/tmodloader/module.yaml @@ -2,7 +2,7 @@ apiVersion: gameplane.local/module/v1 name: tmodloader displayName: tModLoader -version: 1.0.0 +version: 1.0.1 game: tmodloader categories: [Sandbox, Survival, Adventure, Modded] summary: tModLoader dedicated server for modded Terraria gameplay with PTY console, .tmod mod manager, and world saves. diff --git a/tmodloader/specs.md b/tmodloader/specs.md index 140e4ba..1c9f64d 100644 --- a/tmodloader/specs.md +++ b/tmodloader/specs.md @@ -73,7 +73,7 @@ Declared ports under `spec.ports`: ## 8. Key Invariants & Security - **Wake-On-Traffic**: Declares `wakeProtocol: terraria` under `spec.ports[game]`. -- **Readiness Probe**: Uses TCP probe on port `7777`. +- **Readiness Probe**: The same `exec` probe as vanilla Terraria: it reads `/proc/net/tcp` for a socket listening on port `7777` (`0x1E61`) instead of connecting, because a `tcpSocket` probe's connect-and-close crashes the server (`ObjectDisposedException` in `Netplay.ServerLoop`). --- diff --git a/tmodloader/template.yaml b/tmodloader/template.yaml index 6ec4809..81da7a6 100644 --- a/tmodloader/template.yaml +++ b/tmodloader/template.yaml @@ -55,8 +55,11 @@ spec: probes: readiness: - tcpSocket: - port: game + # Ready once the server LISTENs on 7777 (0x1E61 in /proc/net/tcp). Never + # tcpSocket: the kubelet's connect-and-close crashes the server + # (ObjectDisposedException in Netplay.ServerLoop) and crash-loops the pod. + exec: + command: ["sh", "-c", "grep -qsE ':1E61 [0-9A-F]+:[0-9A-F]{4} 0A' /proc/net/tcp /proc/net/tcp6"] initialDelaySeconds: 30 periodSeconds: 10 failureThreshold: 30