swarm-controller: put a failed jobq node's error in the log message
This commit is contained in:
parent
8b228404a7
commit
15964a06f8
2 changed files with 4 additions and 4 deletions
|
|
@ -23,8 +23,8 @@ The swarm's control plane. The swarm UI and `swarmctl` are its clients.
|
||||||
one hive whose declaration places it.
|
one hive whose declaration places it.
|
||||||
- **Job graph** — a `hive-jobq` scheduler, served at `GET /api/jobq/graph`.
|
- **Job graph** — a `hive-jobq` scheduler, served at `GET /api/jobq/graph`.
|
||||||
Every provisioning step below runs as a node in it. A node that fails logs
|
Every provisioning step below runs as a node in it. A node that fails logs
|
||||||
one `warn` line, `swarm jobq: node failed`, with its `node` id, `kind` and
|
one `warn` line, `swarm jobq: node failed: <error>`, with its `node` id and
|
||||||
`error`.
|
`kind`.
|
||||||
- **Agent creation** — `POST /api/agents` queues the SSO identity (through
|
- **Agent creation** — `POST /api/agents` queues the SSO identity (through
|
||||||
`swarm-authelia-bridge`), forge user, config repo, store identity, forge
|
`swarm-authelia-bridge`), forge user, config repo, store identity, forge
|
||||||
token and matrix account, declares the agent `paused`, then sends its hive
|
token and matrix account, declares the agent `paused`, then sends its hive
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ pub(crate) async fn run_swarm_node(
|
||||||
let node_kind = hive_jobq_wire::WireNode::label(&kind);
|
let node_kind = hive_jobq_wire::WireNode::label(&kind);
|
||||||
let (builder, outcome) = run_node_work(kind, builder, deps).await;
|
let (builder, outcome) = run_node_work(kind, builder, deps).await;
|
||||||
if let hive_jobq::scheduler::Outcome::Failed(error) = &outcome {
|
if let hive_jobq::scheduler::Outcome::Failed(error) = &outcome {
|
||||||
tracing::warn!(node = id.get(), kind = %node_kind, %error, "swarm jobq: node failed");
|
tracing::warn!(node = id.get(), kind = %node_kind, "swarm jobq: node failed: {error}");
|
||||||
}
|
}
|
||||||
(builder, outcome)
|
(builder, outcome)
|
||||||
}
|
}
|
||||||
|
|
@ -4797,7 +4797,7 @@ mod mint_identity_tests {
|
||||||
assert_eq!(field("kind"), "set_agent_wanted");
|
assert_eq!(field("kind"), "set_agent_wanted");
|
||||||
assert_eq!(field("node"), ids[0].get().to_string());
|
assert_eq!(field("node"), ids[0].get().to_string());
|
||||||
assert!(
|
assert!(
|
||||||
field("error").contains("no swarm queue is configured"),
|
field("message").contains("no swarm queue is configured"),
|
||||||
"{fields:?}"
|
"{fields:?}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue