From 5594eab8058bc67e6468fc5cba08a6d5898d0113 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Wed, 6 Dec 2023 21:49:41 -0800 Subject: [PATCH] fix phased startup of zones when sled agent starts up (#4588) --- common/src/ledger.rs | 6 +++--- sled-agent/src/services.rs | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/common/src/ledger.rs b/common/src/ledger.rs index c120ab953c..71d03fa8ee 100644 --- a/common/src/ledger.rs +++ b/common/src/ledger.rs @@ -7,7 +7,7 @@ use async_trait::async_trait; use camino::{Utf8Path, Utf8PathBuf}; use serde::{de::DeserializeOwned, Serialize}; -use slog::{error, info, warn, Logger}; +use slog::{debug, info, warn, Logger}; #[derive(thiserror::Error, Debug)] pub enum Error { @@ -88,7 +88,7 @@ impl Ledger { match T::read_from(log, &path).await { Ok(ledger) => ledgers.push(ledger), Err(err) => { - error!(log, "Failed to read ledger: {err}"; "path" => %path) + debug!(log, "Failed to read ledger: {err}"; "path" => %path) } } } @@ -184,7 +184,7 @@ pub trait Ledgerable: DeserializeOwned + Serialize + Send + Sync { err, }) } else { - warn!(log, "No ledger in {path}"); + info!(log, "No ledger in {path}"); Err(Error::NotFound) } } diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index fb6de8d38a..651d2638e0 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -845,12 +845,7 @@ impl ServiceManager { None, omicron_zones_config.clone(), |z: &OmicronZoneConfig| { - matches!( - z.zone_type, - OmicronZoneType::InternalDns { .. } - | OmicronZoneType::BoundaryNtp { .. } - | OmicronZoneType::InternalNtp { .. } - ) + matches!(z.zone_type, OmicronZoneType::InternalDns { .. }) }, ) .await?; @@ -859,8 +854,6 @@ impl ServiceManager { // synchronization, which is a pre-requisite for the other services. We // keep `OmicronZoneType::InternalDns` because // `ensure_all_omicron_zones` is additive. - // TODO This looks like a duplicate of the block above -- why do we do - // this? let all_zones_request = self .ensure_all_omicron_zones( &mut existing_zones,