From fa7db656520e8c7dd2c0e8c6151fafa9d6243474 Mon Sep 17 00:00:00 2001 From: Ryan Goodfellow Date: Mon, 24 Jul 2023 13:23:38 -0700 Subject: [PATCH] move underlay advertisement before sled-server start (#3756) - Fixes #3532 --- sled-agent/src/bootstrap/agent.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sled-agent/src/bootstrap/agent.rs b/sled-agent/src/bootstrap/agent.rs index f4af16a6cc..0ff97fd7ac 100644 --- a/sled-agent/src/bootstrap/agent.rs +++ b/sled-agent/src/bootstrap/agent.rs @@ -769,6 +769,19 @@ impl Agent { monitor: hardware_monitor, }; + // Start trying to notify ddmd of our sled prefix so it can + // advertise it to other sleds. + // + // TODO-security This ddmd_client is used to advertise both this + // (underlay) address and our bootstrap address. Bootstrap addresses are + // unauthenticated (connections made on them are auth'd via sprockets), + // but underlay addresses should be exchanged via authenticated channels + // between ddmd instances. It's TBD how that will work, but presumably + // we'll need to do something different here for underlay vs bootstrap + // addrs (either talk to a differently-configured ddmd, or include info + // indicating which kind of address we're advertising). + self.ddmd_client.advertise_prefix(request.subnet); + // Server does not exist, initialize it. let server = SledServer::start( &self.sled_config, @@ -802,19 +815,6 @@ impl Agent { restarter.cancel(); *state = SledAgentState::After(server); - // Start trying to notify ddmd of our sled prefix so it can - // advertise it to other sleds. - // - // TODO-security This ddmd_client is used to advertise both this - // (underlay) address and our bootstrap address. Bootstrap addresses are - // unauthenticated (connections made on them are auth'd via sprockets), - // but underlay addresses should be exchanged via authenticated channels - // between ddmd instances. It's TBD how that will work, but presumably - // we'll need to do something different here for underlay vs bootstrap - // addrs (either talk to a differently-configured ddmd, or include info - // indicating which kind of address we're advertising). - self.ddmd_client.advertise_prefix(request.subnet); - Ok(SledAgentResponse { id: request.id }) } // We have previously initialized a sled agent.