fix(#1329): restart hive-matrix-daemon after token write so new credential is picked up immediately

This commit is contained in:
damocles 2026-06-05 12:13:37 +02:00 committed by mara
commit f201f04d4e
4 changed files with 52 additions and 0 deletions

View file

@ -189,6 +189,7 @@ pub enum PrivRequest {
DaemonReload,
/// Synchronise the nginx unit inside the `hive-gateway` container.
///
/// hive-priv queries `ActiveState` and dispatches:
/// - `active` → `systemctl reload nginx` (SIGHUP, zero-downtime)
/// - `failed` → `systemctl reset-failed nginx` + `systemctl start nginx`
@ -254,6 +255,15 @@ pub enum PrivRequest {
/// Token value. hive-priv appends a trailing newline before writing.
token: String,
},
/// Restart `hive-matrix-daemon.service` inside an agent container via
/// `systemctl --machine=h-<agent_name> restart hive-matrix-daemon.service`.
/// Used by hive-c0re to kick the daemon after a successful token write
/// so it picks up the new credential without a full container restart.
RestartMatrixDaemon {
/// Logical agent name (validated by `validate_agent_name`).
agent_name: String,
},
}
/// Response from the privileged helper.