Skip to content

Commit 01ebe83

Browse files
committed
add clarifying comments
1 parent 319465e commit 01ebe83

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

sled-agent/config-reconciler/src/ledger.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,21 @@ impl LedgerTaskHandle {
141141
unimplemented!()
142142
}
143143

144+
/// Confirm that a new [`ArtifactConfig`] is valid given the contents of the
145+
/// currently-ledgered [`OmicronSledConfig`].
146+
///
147+
/// In particular, this confirms that a new artifact config does not
148+
/// _remove_ any artifacts needed by zones described by the current sled
149+
/// config.
150+
///
151+
/// The artifact store in sled agent and this task need to coordinate with
152+
/// each other whenever changes are made to either kind of config. This
153+
/// method provides a path for the artifact store to validate its incoming
154+
/// artifact configs against this task, and this task uses the
155+
/// implementation of [`SledAgentArtifactStore`] to validate its incoming
156+
/// sled configs against the artifact store. Validation is always performed
157+
/// by this task, which enforces serialization of the checks in the event of
158+
/// requests arriving concurrently to change both configs.
144159
pub async fn validate_artifact_config(
145160
&self,
146161
_new_config: ArtifactConfig,

sled-agent/config-reconciler/src/sled_agent_facilities.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ pub trait SledAgentFacilities: Send + 'static {
2020
type MetricsUntrackZoneLinksError;
2121
type ZoneBundleCreateError;
2222

23-
/// Called once time is synchronized.
24-
// TODO-cleanup should we do this work ourselves instead?
23+
/// Called by the reconciler task to inform sled-agent that time is
24+
/// sychronized. May be called multiple times.
25+
// TODO-cleanup should we do this work ourselves instead? This is
26+
// currently implemented by `ServiceManager` and does a couple one-time
27+
// setup things (like rewrite the OS boot time). We could probably absorb
28+
// that work and remove this callback.
2529
async fn on_time_sync(&self);
2630

2731
/// Method to start a zone.

0 commit comments

Comments
 (0)