Advance Idunn plan after Gjallar RUDP health

This commit is contained in:
Meta Vens 2026-06-16 06:32:07 +01:00
commit c5778d78b5
4 changed files with 118 additions and 28 deletions

View file

@ -1,7 +1,10 @@
param(
[string] $GjallarRoot = "E:\Projects\Gjallar",
[string] $SshTarget = "nwroot",
[string] $RemoteDir = "/opt/gamecult/gjallar"
[string] $RemoteDir = "/opt/gamecult/gjallar",
[string] $IdunnRudpHealth = "10.77.0.2:17870",
[string] $IdunnDaemon = "nightwing-gjallar",
[string] $IdunnHealthContract = "gjallar.cultnet-rudp-framebuffer-composition-health"
)
$ErrorActionPreference = "Stop"
@ -42,7 +45,15 @@ if ($LASTEXITCODE -ne 0) {
throw "scp failed with exit code $LASTEXITCODE"
}
ssh.exe $SshTarget "mkdir -p '$RemoteDir' && tar -xf /tmp/gjallar-publish.tar -C '$RemoteDir' && chmod +x '$RemoteDir/Gjallar' && systemctl restart gjallar.service && systemctl is-active --quiet gjallar.service"
$dropIn = @"
[Service]
Environment=GJALLAR_IDUNN_RUDP_HEALTH=$IdunnRudpHealth
Environment=GJALLAR_IDUNN_DAEMON=$IdunnDaemon
Environment=GJALLAR_IDUNN_HEALTH_CONTRACT=$IdunnHealthContract
"@
$dropInBase64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($dropIn))
ssh.exe $SshTarget "mkdir -p '$RemoteDir' /etc/systemd/system/gjallar.service.d && tar -xf /tmp/gjallar-publish.tar -C '$RemoteDir' && chmod +x '$RemoteDir/Gjallar' && printf '%s' '$dropInBase64' | base64 -d > /etc/systemd/system/gjallar.service.d/idunn-rudp-health.conf && systemctl daemon-reload && systemctl restart gjallar.service && systemctl is-active --quiet gjallar.service"
if ($LASTEXITCODE -ne 0) {
throw "remote deploy or restart failed with exit code $LASTEXITCODE"
}

View file

@ -82,4 +82,9 @@ if ([int]$status.receive.composedProviders -lt $MinComposedProviders) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Gjallar composed no provider panels: composedProviders=$($status.receive.composedProviders), expected at least $MinComposedProviders."
}
if ($null -eq $status.idunnRudpHealth -or $status.idunnRudpHealth.status -ne "published") {
$detail = if ($null -eq $status.idunnRudpHealth) { "missing idunnRudpHealth status" } else { $status.idunnRudpHealth.error }
Fail-IdunnHealth -State "degraded" -Message "Nightwing Gjallar has not published daemon-owned Idunn RUDP health. $detail"
}
Write-Host "Nightwing Gjallar is active, deployed at $localCommit, and composing $($status.receive.composedProviders)/$($status.receive.catalogProviders) providers."