Skip to content

Move creation of /var/oxide from RSS to bootstrap-agent #1132

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

Merged
merged 1 commit into from
May 27, 2022
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
16 changes: 16 additions & 0 deletions sled-agent/src/bootstrap/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,22 @@ impl Agent {
"server" => sled_config.id.to_string(),
));

// We expect this directory to exist - ensure that it does, before any
// subsequent operations which may write configs here.
info!(
log, "Ensuring config directory exists";
"path" => omicron_common::OMICRON_CONFIG_PATH,
);
tokio::fs::create_dir_all(omicron_common::OMICRON_CONFIG_PATH)
.await
.map_err(|err| BootstrapError::Io {
message: format!(
"Creating config directory {}",
omicron_common::OMICRON_CONFIG_PATH
),
err,
})?;

let data_link = if let Some(link) = sled_config.data_link.clone() {
link
} else {
Expand Down
12 changes: 0 additions & 12 deletions sled-agent/src/rack_setup/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,18 +416,6 @@ impl ServiceInner {
) -> Result<(), SetupServiceError> {
info!(self.log, "Injecting RSS configuration: {:#?}", config);

// We expect this directory to exist - ensure that it does, before any
// subsequent operations which may write configs here.
tokio::fs::create_dir_all(omicron_common::OMICRON_CONFIG_PATH)
.await
.map_err(|err| SetupServiceError::Io {
message: format!(
"Creating config directory {}",
omicron_common::OMICRON_CONFIG_PATH
),
err,
})?;

// Check if a previous RSS plan has completed successfully.
//
// If it has, the system should be up-and-running.
Expand Down