Refresh Nightwing dashboard swarm witness state
This commit is contained in:
parent
3609fdc680
commit
ff8bd8f0fd
3 changed files with 186 additions and 25 deletions
|
|
@ -890,7 +890,7 @@ fn swarm_surgery_plan(
|
|||
updated_at: &str,
|
||||
) -> IdunnSwarmSurgeryPlanRecord {
|
||||
let next_target = [
|
||||
"mimir-eve-dashboard",
|
||||
"nightwing-eve-browser-reference",
|
||||
]
|
||||
.iter()
|
||||
.copied()
|
||||
|
|
@ -934,11 +934,11 @@ fn swarm_surgery_plan(
|
|||
"5. Delete or demote compatibility probes once every target has daemon-owned publication and advertised lifecycle authority.".to_string(),
|
||||
],
|
||||
current_phase:
|
||||
"Phase 16: Nightwing Gjallar now publishes daemon-owned RUDP health and a daemon-owned boundary witness store from the live C# framebuffer runtime; Mimir Eve dashboard is the next compatibility cut because provider advertisement and command boundary publication still sit outside the daemon."
|
||||
"Phase 17: Mimir Eve dashboard now publishes daemon-owned CultMesh state plus a daemon-owned boundary witness store from the live Nightwing C# broker runtime; the browser reference is the next compatibility cut because its lowering surface still lacks a daemon-owned boundary witness."
|
||||
.to_string(),
|
||||
next_target: next_target.to_string(),
|
||||
cut_line:
|
||||
"Muninn, Vili, Idunn, Odin, Stonks, Weksa, VoidBot, Nightwing Gjallar, Mimir Eve dashboard, Nightwing Eve dashboard, Nightwing Eve browser reference, yggdrasil-streampixels, yggdrasil-heimdall, and yggdrasil-repixelizer now exercise daemon-owned RUDP health. Raven GameCult\\Vili has been refreshed from Odin, the hidden scheduled task now launches start-vili-daemon.ps1 with Idunn RUDP arguments, and live Idunn accepts vili.cultnet-rudp-animation-health from 10.77.0.4. Live Raven Muninn task actions remain repaired and verified to execute wscript.exe hidden launchers directly for GameCult-Muninn, GameCult-Muninn-Activate, and GameCult-Muninn-VideoProof, the long-running Muninn serve bodies on Raven, Nightwing, and Starfire now carry their own --idunn-rudp-health, --idunn-daemon, and --idunn-health-contract identity while Idunn accepts muninn from 10.77.0.4, nightwing-muninn from 10.77.0.3, and starfire-muninn from 127.0.0.1, live yggdrasil-streampixels publishes streampixels.cultnet-rudp-service-health from 10.77.0.1, live yggdrasil-heimdall publishes heimdall.cultnet-rudp-provider-health from 10.77.0.1 with a boundary store at /srv/heimdall/cultcache/heimdall.service.cc, live yggdrasil-repixelizer publishes repixelizer.cultnet-rudp-service-health from 10.77.0.1 with a boundary store at /srv/repixelizer/cultcache/repixelizer.service.cc, and live Nightwing Gjallar now publishes a boundary store at /var/lib/gamecult/gjallar/cultcache/gjallar.service.cc. Mimir Eve dashboard remains the next compatibility debt."
|
||||
"Muninn, Vili, Idunn, Odin, Stonks, Weksa, VoidBot, Nightwing Gjallar, Mimir Eve dashboard, Nightwing Eve dashboard, Nightwing Eve browser reference, yggdrasil-streampixels, yggdrasil-heimdall, and yggdrasil-repixelizer now exercise daemon-owned RUDP health. Raven GameCult\\Vili has been refreshed from Odin, the hidden scheduled task now launches start-vili-daemon.ps1 with Idunn RUDP arguments, and live Idunn accepts vili.cultnet-rudp-animation-health from 10.77.0.4. Live Raven Muninn task actions remain repaired and verified to execute wscript.exe hidden launchers directly for GameCult-Muninn, GameCult-Muninn-Activate, and GameCult-Muninn-VideoProof, the long-running Muninn serve bodies on Raven, Nightwing, and Starfire now carry their own --idunn-rudp-health, --idunn-daemon, and --idunn-health-contract identity while Idunn accepts muninn from 10.77.0.4, nightwing-muninn from 10.77.0.3, and starfire-muninn from 127.0.0.1, live yggdrasil-streampixels publishes streampixels.cultnet-rudp-service-health from 10.77.0.1, live yggdrasil-heimdall publishes heimdall.cultnet-rudp-provider-health from 10.77.0.1 with a boundary store at /srv/heimdall/cultcache/heimdall.service.cc, live yggdrasil-repixelizer publishes repixelizer.cultnet-rudp-service-health from 10.77.0.1 with a boundary store at /srv/repixelizer/cultcache/repixelizer.service.cc, live Nightwing Gjallar publishes a boundary store at /var/lib/gamecult/gjallar/cultcache/gjallar.service.cc, and live Mimir Eve dashboard now publishes CultMesh state at /var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp plus a boundary store at /var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc. Nightwing Eve browser reference remains the next compatibility debt."
|
||||
.to_string(),
|
||||
verification_layer:
|
||||
"CultMesh keepalive store records plus live Idunn decision cycles, not process exit codes or chat summaries."
|
||||
|
|
@ -981,9 +981,9 @@ fn daemon_transport_profile(
|
|||
"Gjallar framebuffer composition health is published over CultNet/RUDP from Nightwing, and the daemon-owned boundary store at /var/lib/gamecult/gjallar/cultcache/gjallar.service.cc carries provider advertisement, runtime_config, frame_status, command_boundary, transport_profile, and daemon-health summary state. Native C# CultNet/RUDP deck input remains migration debt before the service/status probe can be deleted.",
|
||||
),
|
||||
"nightwing-eve-dashboard" => (
|
||||
"daemon-published-rudp-health + compatibility.local-command fallback",
|
||||
"partial-rudp-health-live",
|
||||
"Nightwing Eve dashboard service health is published over CultNet/RUDP from the Mimir.EveDashboard systemd process; browser/runtime lowering state and command boundaries remain migration debt before the service probe can be deleted.",
|
||||
"daemon-published-rudp-health + daemon-owned-cultmesh-state + daemon-owned-cultcache-boundary-store + compatibility.local-command fallback",
|
||||
"partial-rudp-health-and-provider-store-live",
|
||||
"Nightwing Eve dashboard service health is published over CultNet/RUDP from the Mimir.EveDashboard systemd process, and the live broker now publishes CultMesh state at /var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp plus a daemon-owned boundary store at /var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc carrying provider manifest, command_boundary, transport_profile, and daemon-health summary state. HTTP/WebSocket remain client lowerings and the local service probe is fallback evidence only.",
|
||||
),
|
||||
"nightwing-eve-browser-reference" => (
|
||||
"daemon-published-rudp-health + compatibility.local-command fallback",
|
||||
|
|
@ -1178,23 +1178,23 @@ fn daemon_surgery_plan(target: &DaemonTarget, updated_at: &str) -> IdunnDaemonSu
|
|||
];
|
||||
}
|
||||
"mimir-eve-dashboard" => {
|
||||
status = "partial-rudp-health-live";
|
||||
status = "partial-rudp-health-and-provider-store-live";
|
||||
severity = "high";
|
||||
owner = "Mimir dashboard runtime";
|
||||
current_mechanism =
|
||||
"Mimir Eve dashboard publishes mimir.cultnet-rudp-provider-health over CultNet/RUDP from the Nightwing systemd broker; provider advertisement and command boundary still retain compatibility projections."
|
||||
"Mimir Eve dashboard publishes mimir.cultnet-rudp-provider-health over CultNet/RUDP from the live Nightwing broker, publishes retained dashboard state through CultMesh at /var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp, and writes a daemon-owned boundary store at /var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc."
|
||||
.to_string();
|
||||
intended_authority =
|
||||
"Mimir dashboard publishes daemon health, provider catalog, Eve dashboard state, command boundary, and transport profile as typed CultMesh/CultNet records over cultnet.transport.rudp.v0; HTTP/WebSocket remain lowerings for clients only."
|
||||
"Mimir dashboard publishes daemon health over cultnet.transport.rudp.v0, publishes retained Eve dashboard state through CultMesh, and keeps provider manifest, command boundary, and transport profile in its daemon-owned boundary witness; HTTP/WebSocket remain lowerings for clients only."
|
||||
.to_string();
|
||||
cut_line =
|
||||
"Keep the local HTTP probe as fallback only until Mimir provider advertisement and command_boundary records are also daemon-owned RUDP publications."
|
||||
"Keep the local HTTP probe as fallback only until Odin and Idunn consume the daemon-owned Mimir witness paths directly instead of treating the HTTP surface as the primary proof."
|
||||
.to_string();
|
||||
steps = vec![
|
||||
"Keep live mimir.cultnet-rudp-provider-health publication running from the Nightwing Eve dashboard broker.".to_string(),
|
||||
"Publish Mimir Eve dashboard provider advertisement and retained state records over cultnet.transport.rudp.v0.".to_string(),
|
||||
"Publish Mimir Eve dashboard command_boundary and transport_profile records from the daemon runtime.".to_string(),
|
||||
"Teach Odin to prefer Mimir RUDP/CultMesh provider records over compatibility HTTP catalog ingestion.".to_string(),
|
||||
"Keep the live CultMesh state witness at /var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp publishing retained dashboard state.".to_string(),
|
||||
"Keep the daemon-owned boundary store at /var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc publishing provider manifest, command_boundary, transport_profile, and daemon-health summary records.".to_string(),
|
||||
"Teach Odin to prefer Mimir CultMesh/CultCache witness paths over compatibility HTTP catalog ingestion.".to_string(),
|
||||
"Delete or demote health-mimir-eve-dashboard.cmd to a manual compatibility probe with no lifecycle truth.".to_string(),
|
||||
];
|
||||
}
|
||||
|
|
@ -1321,18 +1321,18 @@ fn daemon_surgery_plan(target: &DaemonTarget, updated_at: &str) -> IdunnDaemonSu
|
|||
"Eve runtimes subscribe to provider-owned CultMesh/CultNet state; any browser/WebSocket bridge is display-only and does not own daemon health."
|
||||
.to_string();
|
||||
if target.daemon_id == "nightwing-eve-dashboard" {
|
||||
status = "partial-rudp-health-live";
|
||||
status = "partial-rudp-health-and-provider-store-live";
|
||||
current_mechanism =
|
||||
"Nightwing Eve dashboard publishes nightwing.cultnet-rudp-eve-dashboard-health over CultNet/RUDP from the Mimir.EveDashboard systemd process; the local service probe remains fallback evidence only."
|
||||
"Nightwing Eve dashboard publishes nightwing.cultnet-rudp-eve-dashboard-health over CultNet/RUDP from the Mimir.EveDashboard systemd process, with retained dashboard state in /var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp and a daemon-owned boundary store at /var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc."
|
||||
.to_string();
|
||||
cut_line =
|
||||
"Keep the service probe as fallback only until the Nightwing Eve dashboard lowering surface publishes provider advertisement, command_boundary, and transport_profile records over CultNet/RUDP."
|
||||
"Keep the service probe as fallback only until Nightwing projections and Odin consume the dashboard CultMesh/CultCache witnesses directly instead of treating the service probe as primary truth."
|
||||
.to_string();
|
||||
steps = vec![
|
||||
"Keep live nightwing.cultnet-rudp-eve-dashboard-health publication running from the Mimir.EveDashboard systemd process.".to_string(),
|
||||
"Publish Nightwing Eve dashboard provider advertisement and lowering-state records over cultnet.transport.rudp.v0.".to_string(),
|
||||
"Publish Nightwing Eve dashboard command_boundary and transport_profile records from the runtime.".to_string(),
|
||||
"Teach Odin and Nightwing projections to prefer the dashboard RUDP/CultMesh records over service compatibility probes.".to_string(),
|
||||
"Keep the live CultMesh state witness at /var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp publishing retained dashboard state.".to_string(),
|
||||
"Keep the daemon-owned boundary store at /var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc publishing provider manifest, command_boundary, transport_profile, and daemon-health summary records.".to_string(),
|
||||
"Teach Odin and Nightwing projections to prefer the dashboard CultMesh/CultCache witnesses over service compatibility probes.".to_string(),
|
||||
"Delete or demote health-nightwing-eve-dashboard.cmd to a manual compatibility probe with no lifecycle truth.".to_string(),
|
||||
];
|
||||
} else {
|
||||
|
|
@ -2212,7 +2212,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn swarm_surgery_plan_names_mimir_after_gjallar_cut() {
|
||||
fn swarm_surgery_plan_names_browser_reference_after_mimir_dashboard_cut() {
|
||||
let starfire_muninn = DaemonTarget {
|
||||
daemon_id: "starfire-muninn".to_string(),
|
||||
verse_id: "starfire.local".to_string(),
|
||||
|
|
@ -2421,7 +2421,7 @@ mod tests {
|
|||
|
||||
assert_eq!(plan.plan_id, "swarm-surgery:starfire-local");
|
||||
assert_eq!(plan.status, "active-transport-migration");
|
||||
assert_eq!(plan.next_target, "mimir-eve-dashboard");
|
||||
assert_eq!(plan.next_target, "nightwing-eve-browser-reference");
|
||||
assert!(plan.current_phase.contains("Mimir Eve dashboard"));
|
||||
assert!(
|
||||
plan.cut_line
|
||||
|
|
@ -2443,9 +2443,12 @@ mod tests {
|
|||
assert!(plan.cut_line.contains("/srv/heimdall/cultcache/heimdall.service.cc"));
|
||||
assert!(plan.cut_line.contains("repixelizer.cultnet-rudp-service-health"));
|
||||
assert!(plan.cut_line.contains("/srv/repixelizer/cultcache/repixelizer.service.cc"));
|
||||
assert!(plan.cut_line.contains("Nightwing Gjallar now publishes a boundary store"));
|
||||
assert!(plan.cut_line.contains("live Nightwing Gjallar publishes a boundary store"));
|
||||
assert!(plan.cut_line.contains("/var/lib/gamecult/gjallar/cultcache/gjallar.service.cc"));
|
||||
assert!(plan.cut_line.contains("Mimir Eve dashboard remains"));
|
||||
assert!(plan.cut_line.contains("live Mimir Eve dashboard now publishes CultMesh state"));
|
||||
assert!(plan.cut_line.contains("/var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp"));
|
||||
assert!(plan.cut_line.contains("/var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc"));
|
||||
assert!(plan.cut_line.contains("Nightwing Eve browser reference remains"));
|
||||
assert!(plan.verification_layer.contains("CultMesh keepalive store"));
|
||||
assert!(
|
||||
plan.invariants
|
||||
|
|
@ -2546,13 +2549,23 @@ mod tests {
|
|||
daemon_surgery_plan(&nightwing_eve_dashboard, "unix:100");
|
||||
assert_eq!(
|
||||
nightwing_eve_dashboard_plan.status,
|
||||
"partial-rudp-health-live"
|
||||
"partial-rudp-health-and-provider-store-live"
|
||||
);
|
||||
assert!(
|
||||
nightwing_eve_dashboard_plan
|
||||
.current_mechanism
|
||||
.contains("nightwing.cultnet-rudp-eve-dashboard-health")
|
||||
);
|
||||
assert!(
|
||||
nightwing_eve_dashboard_plan
|
||||
.current_mechanism
|
||||
.contains("/var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp")
|
||||
);
|
||||
assert!(
|
||||
nightwing_eve_dashboard_plan
|
||||
.current_mechanism
|
||||
.contains("/var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc")
|
||||
);
|
||||
assert!(
|
||||
nightwing_eve_dashboard_plan
|
||||
.steps
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
@echo off
|
||||
ssh.exe -o BatchMode=yes -o ConnectTimeout=5 nightwing systemctl is-active --quiet nightwing-eve-dashboard.service
|
||||
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0health-nightwing-eve-dashboard.ps1" %*
|
||||
|
|
|
|||
148
scripts/health-nightwing-eve-dashboard.ps1
Normal file
148
scripts/health-nightwing-eve-dashboard.ps1
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
param(
|
||||
[string] $SshTarget = "nightwing",
|
||||
[string] $RemoteCultMeshState = "/var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp",
|
||||
[string] $RemoteCultCacheWitness = "/var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc",
|
||||
[string] $LegacyWindowsWitness = "/opt/gamecult/eve-dashboard/E:\\Projects\\Mimir\\state\\eve-dashboard-cultnet.ccmp",
|
||||
[int] $MaxWitnessAgeSeconds = 120,
|
||||
[int] $MinProviders = 1
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Fail-IdunnHealth {
|
||||
param(
|
||||
[string] $State,
|
||||
[string] $Message
|
||||
)
|
||||
|
||||
Write-Output "idunn.health.state=$State"
|
||||
throw $Message
|
||||
}
|
||||
|
||||
ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "systemctl is-active --quiet nightwing-eve-dashboard.service"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Fail-IdunnHealth -State "failed" -Message "nightwing-eve-dashboard.service is not active on Nightwing."
|
||||
}
|
||||
|
||||
$healthJson = ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "curl -fsS http://127.0.0.1:8795/health"
|
||||
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($healthJson)) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard /health probe failed."
|
||||
}
|
||||
|
||||
$health = $healthJson | ConvertFrom-Json
|
||||
if (-not $health.ok) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard reported ok=false."
|
||||
}
|
||||
|
||||
if ($health.cultMeshDocument -ne "mimir.eve_dashboard_state") {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard reported unexpected CultMesh document '$($health.cultMeshDocument)'."
|
||||
}
|
||||
|
||||
if ($null -eq $health.cultMeshWitness) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard did not report cultMeshWitness status."
|
||||
}
|
||||
|
||||
if ($health.cultMeshWitness.status -ne "published") {
|
||||
$detail = $health.cultMeshWitness.error
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard has not published its CultMesh state witness. $detail"
|
||||
}
|
||||
|
||||
if ($health.cultMeshWitness.path -ne $RemoteCultMeshState) {
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh state path is '$($health.cultMeshWitness.path)', expected '$RemoteCultMeshState'."
|
||||
}
|
||||
|
||||
if ($null -eq $health.cultCacheWitness) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard did not report cultCacheWitness status."
|
||||
}
|
||||
|
||||
if ($health.cultCacheWitness.status -ne "published") {
|
||||
$detail = $health.cultCacheWitness.error
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard has not published its daemon-owned CultCache witness. $detail"
|
||||
}
|
||||
|
||||
if ($health.cultCacheWitness.path -ne $RemoteCultCacheWitness) {
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultCache witness path is '$($health.cultCacheWitness.path)', expected '$RemoteCultCacheWitness'."
|
||||
}
|
||||
|
||||
$requiredCultMeshSchemas = @(
|
||||
"mimir.eve_dashboard_state.v1"
|
||||
)
|
||||
|
||||
$publishedCultMeshSchemas = @($health.cultMeshWitness.publishedSchemas)
|
||||
foreach ($schema in $requiredCultMeshSchemas) {
|
||||
if ($publishedCultMeshSchemas -notcontains $schema) {
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh witness is missing schema '$schema'."
|
||||
}
|
||||
}
|
||||
|
||||
$requiredCultCacheSchemas = @(
|
||||
"mimir.eve_dashboard_manifest.v1",
|
||||
"mimir.eve_dashboard_command_boundary.v1",
|
||||
"mimir.eve_dashboard_transport_profile.v1",
|
||||
"idunn.daemon_health.v1"
|
||||
)
|
||||
|
||||
$publishedCultCacheSchemas = @($health.cultCacheWitness.publishedSchemas)
|
||||
foreach ($schema in $requiredCultCacheSchemas) {
|
||||
if ($publishedCultCacheSchemas -notcontains $schema) {
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultCache witness is missing schema '$schema'."
|
||||
}
|
||||
}
|
||||
|
||||
if ($null -eq $health.idunnRudpHealth -or $health.idunnRudpHealth.status -ne "published") {
|
||||
$detail = if ($null -eq $health.idunnRudpHealth) { "missing idunnRudpHealth status" } else { $health.idunnRudpHealth.error }
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard has not published daemon-owned Idunn RUDP health. $detail"
|
||||
}
|
||||
|
||||
if ([int]$health.providers -lt $MinProviders) {
|
||||
Fail-IdunnHealth -State "dependency-unavailable" -Message "Nightwing Eve dashboard reports too few providers: providers=$($health.providers), expected at least $MinProviders."
|
||||
}
|
||||
|
||||
$cultMeshStateStat = ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "stat -c '%s %Y' '$RemoteCultMeshState' 2>/dev/null"
|
||||
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($cultMeshStateStat)) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state witness is missing at $RemoteCultMeshState."
|
||||
}
|
||||
|
||||
$cultMeshStateParts = $cultMeshStateStat.Trim() -split '\s+'
|
||||
if ($cultMeshStateParts.Length -lt 2) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state stat output was malformed: $cultMeshStateStat"
|
||||
}
|
||||
|
||||
$cultMeshStateSize = [int64]$cultMeshStateParts[0]
|
||||
$cultMeshStateModifiedUtc = [DateTimeOffset]::FromUnixTimeSeconds([int64]$cultMeshStateParts[1])
|
||||
$cultMeshStateAgeSeconds = ([DateTimeOffset]::UtcNow - $cultMeshStateModifiedUtc).TotalSeconds
|
||||
if ($cultMeshStateSize -le 0) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state witness at $RemoteCultMeshState is empty."
|
||||
}
|
||||
|
||||
if ($cultMeshStateAgeSeconds -gt $MaxWitnessAgeSeconds) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state witness is stale ($([math]::Round($cultMeshStateAgeSeconds))s old)."
|
||||
}
|
||||
|
||||
$cultCacheStat = ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "stat -c '%s %Y' '$RemoteCultCacheWitness' 2>/dev/null"
|
||||
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($cultCacheStat)) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness is missing at $RemoteCultCacheWitness."
|
||||
}
|
||||
|
||||
$cultCacheParts = $cultCacheStat.Trim() -split '\s+'
|
||||
if ($cultCacheParts.Length -lt 2) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness stat output was malformed: $cultCacheStat"
|
||||
}
|
||||
|
||||
$cultCacheSize = [int64]$cultCacheParts[0]
|
||||
$cultCacheModifiedUtc = [DateTimeOffset]::FromUnixTimeSeconds([int64]$cultCacheParts[1])
|
||||
$cultCacheAgeSeconds = ([DateTimeOffset]::UtcNow - $cultCacheModifiedUtc).TotalSeconds
|
||||
if ($cultCacheSize -le 0) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness at $RemoteCultCacheWitness is empty."
|
||||
}
|
||||
|
||||
if ($cultCacheAgeSeconds -gt $MaxWitnessAgeSeconds) {
|
||||
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness is stale ($([math]::Round($cultCacheAgeSeconds))s old)."
|
||||
}
|
||||
|
||||
$legacyWitnessStillExists = ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "test ! -e '$LegacyWindowsWitness'"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard still has the legacy Windows-shaped witness file at $LegacyWindowsWitness."
|
||||
}
|
||||
|
||||
Write-Host "Nightwing Eve dashboard is active, publishing daemon-owned CultMesh witness state, and advertising $($health.providers) providers."
|
||||
Loading…
Reference in a new issue