build agents only from internal/meta; delete the hive's local meta flake
The hive no longer renders, locks or commits a meta flake. A rebuild's MetaSync node picks the internal/meta commit and records it with the hyperhive and config pins it holds; Prebuild, Swap and Create build from it, and a head that does not pin the agent's current config fails the build naming the agent. hive-priv's meta_rev is required. Removed: meta.rs sync/lock/render, the manual-rebuild relock, the boot sweep's hyperhive bump (MetaLock), the update-meta-inputs form and its panel, MetaWindow, the hive's hyperhive_rev setting. Kept: agent_set::refresh holds what sync_agents also did (topology.json, the gateway's agent-socket map and nginx include), called from spawn, destroy, rebuild and the migration. The boot reconcile and the stale-start upgrade compare the agent's marker with the hyperhive pin of internal/meta; the dashboard's deployed chip reads the config marker a successful build writes.
This commit is contained in:
parent
cea4827918
commit
4aa11b3a94
64 changed files with 1042 additions and 3793 deletions
|
|
@ -1139,10 +1139,10 @@ pub(crate) async fn queue_merged_config_deploy(
|
|||
/// The sub-DAG a merged config PR is: the meta update, then the deploy of
|
||||
/// `rev` on `hive`.
|
||||
///
|
||||
/// `after_any`: a hive builds from `internal/meta` only while it pins the
|
||||
/// agent's config commit, and renders locally otherwise, as a hive that
|
||||
/// predates the repo always does. A failed update (no builder, an unreadable
|
||||
/// config repo) must not hold those hives back.
|
||||
/// `after_any`: the deploy is asked for even when the update failed (no
|
||||
/// builder, an unreadable config repo). A hive builds only from
|
||||
/// `internal/meta`, so it fails that build, naming the agent, while the repo
|
||||
/// does not pin the agent's config commit.
|
||||
fn merged_deploy_job(
|
||||
b: &hive_jobq::builder::JobBuilder<SwarmNodeKind, SwarmResourceKind>,
|
||||
hive: &str,
|
||||
|
|
@ -1251,10 +1251,10 @@ pub(crate) fn declare_agent_job(
|
|||
hive: hive.to_owned(),
|
||||
agent: agent.to_owned(),
|
||||
});
|
||||
// The hive builds the agent from `internal/meta` once it pins the agent's
|
||||
// config commit, and renders locally until then. `after_any` on the
|
||||
// update, so one that failed (no builder, an unreadable config repo)
|
||||
// still lets the hive build the agent that way.
|
||||
// The hive builds the agent from `internal/meta` and fails that build,
|
||||
// naming the agent, until the repo pins the agent's config commit.
|
||||
// `after_any` on the update, so one that failed (no builder, an unreadable
|
||||
// config repo) still asks for the deploy.
|
||||
let update_meta = b
|
||||
.node(SwarmNodeKind::UpdateMeta)
|
||||
.needs(SwarmResourceKind::Meta)
|
||||
|
|
@ -2142,8 +2142,8 @@ mod tests {
|
|||
.accepts(hive_jobq::TerminalState::Failed)
|
||||
}
|
||||
|
||||
/// A deploy that waits for the meta update must still run when the update
|
||||
/// fails: a hive that renders locally never needed it.
|
||||
/// A deploy that waits for the meta update still runs when the update
|
||||
/// fails.
|
||||
#[test]
|
||||
fn a_failed_meta_update_does_not_hold_back_the_deploys() {
|
||||
let create = |b: &hive_jobq::builder::JobBuilder<SwarmNodeKind, SwarmResourceKind>| {
|
||||
|
|
|
|||
Loading…
Reference in a new issue