diff --git a/hive-c0re/src/manager_server.rs b/hive-c0re/src/manager_server.rs index 64c1caf..4a618ea 100644 --- a/hive-c0re/src/manager_server.rs +++ b/hive-c0re/src/manager_server.rs @@ -287,10 +287,17 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc) -> ManagerResp ManagerRequest::GetLogs { agent, lines } => { let n = lines.unwrap_or(50); // `journalctl -M` wants the *machine* name, not the - // logical agent name. Map it the same way every other - // lifecycle verb does so the caller passes `gui` and we - // resolve `h-gui` (manager stays `hm1nd`). - let machine = crate::lifecycle::container_name(agent); + // logical agent name: `gui` → `h-gui`. `container_name` + // does that and passes `hm1nd` through unprefixed — but + // it doesn't know the broker-logical manager name + // `"manager"` (it'd wrongly produce `h-manager`), so + // handle that alias explicitly. Either manager spelling + // resolves to the unprefixed `hm1nd` machine. + let machine = if agent == MANAGER_AGENT { + crate::lifecycle::MANAGER_NAME.to_owned() + } else { + crate::lifecycle::container_name(agent) + }; tracing::info!(%agent, %machine, %n, "manager: get_logs"); match tokio::process::Command::new("journalctl") .args([