Skip to content

Commit

Permalink
fix phased startup of zones when sled agent starts up (#4588)
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco authored Dec 7, 2023
1 parent 9aec9ba commit 5594eab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 3 additions & 3 deletions common/src/ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -88,7 +88,7 @@ impl<T: Ledgerable> Ledger<T> {
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)
}
}
}
Expand Down Expand Up @@ -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)
}
}
Expand Down
9 changes: 1 addition & 8 deletions sled-agent/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand All @@ -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,
Expand Down

0 comments on commit 5594eab

Please sign in to comment.