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

Reconfigurator: Record external networking allocations when realizing a blueprint #5045

Merged
merged 10 commits into from
Feb 21, 2024
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions nexus/blueprint-execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ omicron-rpaths.workspace = true
[dependencies]
anyhow.workspace = true
futures.workspace = true
nexus-db-model.workspace = true
nexus-db-queries.workspace = true
nexus-types.workspace = true
omicron-common.workspace = true
reqwest.workspace = true
sled-agent-client.workspace = true
slog.workspace = true
Expand All @@ -31,4 +33,5 @@ nexus-test-utils.workspace = true
nexus-test-utils-macros.workspace = true
omicron-common.workspace = true
omicron-nexus.workspace = true
omicron-test-utils.workspace = true
tokio.workspace = true
11 changes: 11 additions & 0 deletions nexus/blueprint-execution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use nexus_types::deployment::Blueprint;
use slog::o;

mod omicron_zones;
mod resource_allocation;

/// Make one attempt to realize the given blueprint, meaning to take actions to
/// alter the real system to match the blueprint
Expand All @@ -24,6 +25,16 @@ pub async fn realize_blueprint(
blueprint: &Blueprint,
) -> Result<(), Vec<anyhow::Error>> {
let log = opctx.log.new(o!("comment" => blueprint.comment.clone()));

resource_allocation::ensure_zone_resources_allocated(
&log,
opctx,
datastore,
&blueprint.omicron_zones,
)
.await
.map_err(|err| vec![err])?;

omicron_zones::deploy_zones(
&log,
opctx,
Expand Down
Loading
Loading