Trace and update StreamPixels RUDP surgery state
This commit is contained in:
parent
511046908b
commit
a9346a56dc
1 changed files with 52 additions and 10 deletions
|
|
@ -627,12 +627,24 @@ fn run_rudp_health_ingress_loop(
|
|||
let local_addr = socket.local_addr()?;
|
||||
let mut sessions: HashMap<SocketAddr, CultNetRudpSession> = HashMap::new();
|
||||
let mut buffer = vec![0_u8; 65_535];
|
||||
let trace_ingress = env::var("IDUNN_RUDP_HEALTH_TRACE")
|
||||
.map(|value| value == "1" || value.eq_ignore_ascii_case("true"))
|
||||
.unwrap_or(false);
|
||||
|
||||
loop {
|
||||
match socket.recv_from(&mut buffer) {
|
||||
Ok((size, source)) => {
|
||||
let observed_at = timestamp()?;
|
||||
match handle_rudp_health_datagram(&socket, &mut sessions, &buffer[..size], source) {
|
||||
if trace_ingress {
|
||||
println!("Idunn RUDP health ingress received {size} bytes from {source}.");
|
||||
}
|
||||
match handle_rudp_health_datagram(
|
||||
&socket,
|
||||
&mut sessions,
|
||||
&buffer[..size],
|
||||
source,
|
||||
trace_ingress,
|
||||
) {
|
||||
Ok(frames) => {
|
||||
for frame in frames {
|
||||
let message = match decode_cultnet_message_from_slice(
|
||||
|
|
@ -641,6 +653,11 @@ fn run_rudp_health_ingress_loop(
|
|||
) {
|
||||
Ok(message) => message,
|
||||
Err(error) => {
|
||||
if trace_ingress {
|
||||
println!(
|
||||
"Idunn RUDP health ingress rejected schema bytes from {source}: {error}"
|
||||
);
|
||||
}
|
||||
publish_rudp_ingress_failure(
|
||||
&options,
|
||||
&store_lock,
|
||||
|
|
@ -675,6 +692,11 @@ fn run_rudp_health_ingress_loop(
|
|||
}
|
||||
}
|
||||
Err(error) => {
|
||||
if trace_ingress {
|
||||
println!(
|
||||
"Idunn RUDP health ingress rejected schema frame from {source}: {error}"
|
||||
);
|
||||
}
|
||||
publish_rudp_ingress_failure(
|
||||
&options,
|
||||
&store_lock,
|
||||
|
|
@ -689,6 +711,11 @@ fn run_rudp_health_ingress_loop(
|
|||
}
|
||||
}
|
||||
Err(error) => {
|
||||
if trace_ingress {
|
||||
println!(
|
||||
"Idunn RUDP health ingress rejected datagram from {source}: {error}"
|
||||
);
|
||||
}
|
||||
publish_rudp_ingress_failure(
|
||||
&options,
|
||||
&store_lock,
|
||||
|
|
@ -739,6 +766,7 @@ fn handle_rudp_health_datagram(
|
|||
sessions: &mut HashMap<SocketAddr, CultNetRudpSession>,
|
||||
wire: &[u8],
|
||||
source: SocketAddr,
|
||||
trace_ingress: bool,
|
||||
) -> Result<Vec<cultnet_rs::CultNetTransportFrame>> {
|
||||
let packet = decode_rudp_packet(wire)?;
|
||||
if packet.connection_id != IDUNN_HEALTH_RUDP_CONNECTION_ID {
|
||||
|
|
@ -758,7 +786,14 @@ fn handle_rudp_health_datagram(
|
|||
max_pending_reliable_packets: None,
|
||||
});
|
||||
let accept = session.accept_connect(&packet, now, Vec::new())?;
|
||||
socket.send_to(&encode_rudp_packet(&accept)?, source)?;
|
||||
let accept_wire = encode_rudp_packet(&accept)?;
|
||||
socket.send_to(&accept_wire, source)?;
|
||||
if trace_ingress {
|
||||
println!(
|
||||
"Idunn RUDP health ingress accepted connect from {source} with sequence {}.",
|
||||
packet.sequence
|
||||
);
|
||||
}
|
||||
sessions.insert(source, session);
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
|
@ -773,6 +808,13 @@ fn handle_rudp_health_datagram(
|
|||
});
|
||||
|
||||
let result = session.receive(&packet, now)?;
|
||||
if trace_ingress && packet.packet_type == CultNetRudpPacketType::Data {
|
||||
println!(
|
||||
"Idunn RUDP health ingress data from {source}: sequence {} delivered {} frame(s).",
|
||||
packet.sequence,
|
||||
result.delivered.len()
|
||||
);
|
||||
}
|
||||
if let Some(reply) = result.reply {
|
||||
socket.send_to(&encode_rudp_packet(&reply)?, source)?;
|
||||
}
|
||||
|
|
@ -957,9 +999,9 @@ fn daemon_transport_profile(
|
|||
"Vili has an in-process CultNet/RUDP Idunn health publisher plus local CultCache provider, operator, command_boundary, and transport_profile records; live Raven deployment and scheduled-task restart are blocked while Raven SSH is unreachable.",
|
||||
),
|
||||
"yggdrasil-streampixels" => (
|
||||
"daemon-owned-cultcache-service-boundary + implemented-rudp-health-publisher + compatibility.ssh-systemd-http fallback",
|
||||
"publisher-implemented-ingress-acceptance-required",
|
||||
"StreamPixels service runtime publishes a daemon-owned CultCache boundary with provider advertisement, command_boundary, transport_profile, and Idunn health summary; the service now has an in-process CultNet/RUDP health publisher, but local one-shot acceptance and Yggdrasil deployment still need proof before SSH/systemd/HTTP checks can be demoted.",
|
||||
"daemon-published-rudp-health-local-proof + daemon-owned-cultcache-service-boundary + compatibility.ssh-systemd-http fallback",
|
||||
"partial-rudp-health-and-provider-store-live",
|
||||
"StreamPixels service runtime publishes a daemon-owned CultCache boundary with provider advertisement, command_boundary, transport_profile, and Idunn health summary; the service now has local Idunn acceptance proof for its in-process CultNet/RUDP health publisher. Yggdrasil deployment still needs proof before SSH/systemd/HTTP checks can be demoted.",
|
||||
),
|
||||
_ => (
|
||||
"compatibility.local-command",
|
||||
|
|
@ -1274,22 +1316,22 @@ fn daemon_surgery_plan(target: &DaemonTarget, updated_at: &str) -> IdunnDaemonSu
|
|||
}
|
||||
"yggdrasil-streampixels" => {
|
||||
severity = "medium";
|
||||
status = "publisher-implemented-ingress-acceptance-required";
|
||||
status = "partial-rudp-health-and-provider-store-live";
|
||||
owner = "StreamPixels service runtime plus gamecult-ops deploy lane";
|
||||
current_mechanism =
|
||||
"StreamPixels now publishes a daemon-owned CultCache boundary store with provider advertisement, command_boundary, transport_profile, and Idunn health summary from the service runtime. The service has an in-process CultNet/RUDP Idunn health publisher wired behind STREAMPIXELS_IDUNN_RUDP_HEALTH, but local one-shot publisher acceptance is still failing while resident Idunn publishers succeed. Yggdrasil deployment freshness is still checked and deployed through SSH/systemd/source-artifact compatibility scripts."
|
||||
"StreamPixels publishes a daemon-owned CultCache boundary store with provider advertisement, command_boundary, transport_profile, and Idunn health summary from the service runtime. The service has local Idunn acceptance proof for its in-process CultNet/RUDP Idunn health publisher wired behind STREAMPIXELS_IDUNN_RUDP_HEALTH. Yggdrasil deployment freshness is still checked and deployed through SSH/systemd/source-artifact compatibility scripts."
|
||||
.to_string();
|
||||
intended_authority =
|
||||
"StreamPixels publishes service health, provider state, command boundary, and transport profile over cultnet.transport.rudp.v0, with the service-owned CultCache boundary as durable local state and HTTP/SSH/systemd as fallback witnesses."
|
||||
.to_string();
|
||||
cut_line =
|
||||
"Keep the StreamPixels service boundary store and in-process RUDP publisher; fix/prove Idunn acceptance for StreamPixels one-shot health publication, deploy it on Yggdrasil, then demote SSH/systemd/HTTP checks to deployment/debug witnesses."
|
||||
"Keep the StreamPixels service boundary store and in-process RUDP publisher; deploy it on Yggdrasil and verify live health publication, then demote SSH/systemd/HTTP checks to deployment/debug witnesses."
|
||||
.to_string();
|
||||
steps = vec![
|
||||
"Keep apps/service/src/verse-state.ts publishing streampixels.service.cc from the StreamPixels service runtime.".to_string(),
|
||||
"Teach Odin to ingest StreamPixels provider advertisement, command_boundary, and transport_profile records from the service-owned CultCache boundary store.".to_string(),
|
||||
"Keep the StreamPixels in-process Idunn RUDP health publisher using contract streampixels.cultnet-rudp-service-health.".to_string(),
|
||||
"Fix or prove Idunn acceptance for fresh one-shot RUDP health publishers; current resident publishers are accepted, but StreamPixels/Odin one-shot probes time out before accept.".to_string(),
|
||||
"Keep the local Idunn acceptance proof for StreamPixels RUDP health; the publisher sends the health document after a short accept grace period so one-shot pulses do not depend on receiving the accept reply.".to_string(),
|
||||
"Deploy the updated service to Yggdrasil through the source artifact lane and verify the live store/health publication.".to_string(),
|
||||
"Demote health-yggdrasil-streampixels.cmd to deployment/debug witness once RUDP health is live.".to_string(),
|
||||
];
|
||||
|
|
@ -2542,7 +2584,7 @@ mod tests {
|
|||
|
||||
assert_eq!(
|
||||
profile.state,
|
||||
"publisher-implemented-ingress-acceptance-required"
|
||||
"partial-rudp-health-and-provider-store-live"
|
||||
);
|
||||
assert!(
|
||||
profile
|
||||
|
|
|
|||
Loading…
Reference in a new issue