Skip to content

Commit 194594d

Browse files
authored
TQ: Start sled agents from background task (#9734)
When sleds are added to a trust quorum reconfiguration, and the configuration has committed, any new sleds must have their subnets allocated and sled agents started. We do that here from within the background task that finishes the commit.
1 parent 8b491f8 commit 194594d

File tree

2 files changed

+403
-57
lines changed

2 files changed

+403
-57
lines changed

nexus/db-queries/src/db/datastore/trust_quorum.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ impl DataStore {
787787
rack_id: RackUuid,
788788
epoch: Epoch,
789789
acked_commits: BTreeSet<BaseboardId>,
790-
) -> Result<(), Error> {
790+
) -> Result<TrustQuorumConfigState, Error> {
791791
opctx.authorize(authz::Action::Modify, &authz::FLEET).await?;
792792
let conn = &*self.pool_connection_authorized(opctx).await?;
793793

@@ -873,9 +873,11 @@ impl DataStore {
873873
)
874874
.await
875875
.map_err(|txn_error| txn_error.into_diesel(&err))?;
876+
877+
return Ok(TrustQuorumConfigState::Committed);
876878
}
877879

878-
Ok(())
880+
Ok(TrustQuorumConfigState::Committing)
879881
}
880882
})
881883
.await

0 commit comments

Comments
 (0)