Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix phased startup of zones when sled agent starts up #4588

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tiny change came along for the ride. This is not an error condition. It happens during normal operation.

}
}
}
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}");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also happens during normal operation prior to the ledgers being initially written (during initial setup, if nothing else) so I found it misleading to make these warnings.

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
Loading