Skip to content
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
3 changes: 2 additions & 1 deletion dev-tools/omdb/src/bin/omdb/nexus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1268,11 +1268,12 @@ fn print_task_blueprint_planner(details: &serde_json::Value) {
but could not make it the target: {error}"
);
}
BlueprintPlannerStatus::Targeted { blueprint_id, .. } => {
BlueprintPlannerStatus::Targeted { blueprint_id, report, .. } => {
println!(
" planned new blueprint {blueprint_id}, \
and made it the current target"
);
println!("{report}");
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,9 @@ parent: <none>

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint ......<REDACTED_BLUEPRINT_ID>........


---------------------------------------------
stderr:
note: using Nexus URL http://127.0.0.1:REDACTED_PORT/
Expand Down Expand Up @@ -1735,6 +1738,9 @@ parent: <none>

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint ......<REDACTED_BLUEPRINT_ID>........


---------------------------------------------
stderr:
note: using Nexus URL http://127.0.0.1:REDACTED_PORT/
Expand Down
10 changes: 5 additions & 5 deletions dev-tools/reconfigurator-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1861,14 +1861,14 @@ fn cmd_blueprint_plan(
&planning_input,
creator,
collection,
rng,
)
.context("creating planner")?
.with_rng(rng);
.context("creating planner")?;

let blueprint = planner.plan().context("generating blueprint")?;
let rv = format!(
"generated blueprint {} based on parent blueprint {}",
blueprint.id, parent_blueprint.id,
"generated blueprint {} based on parent blueprint {}\n{}",
blueprint.id, parent_blueprint.id, blueprint.report,
);
system.add_blueprint(blueprint)?;

Expand Down Expand Up @@ -1906,9 +1906,9 @@ fn cmd_blueprint_edit(
&planning_input,
&latest_collection,
creator,
rng,
)
.context("creating blueprint builder")?;
builder.set_rng(rng);

if let Some(comment) = args.comment {
builder.comment(comment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,15 @@ generated inventory collection eb0796d5-ab8a-4f7b-a884-b4aeacb8ab51 from configu
> # we added has no disks.
> blueprint-plan dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21 eb0796d5-ab8a-4f7b-a884-b4aeacb8ab51
INFO skipping noop image source check for all sleds, reason: no target release is currently set
INFO skipping sled (no zpools in service), sled_id: 00320471-945d-413c-85e7-03e091a70b3c
INFO sufficient BoundaryNtp zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient Clickhouse zones exist in plan, desired_count: 1, current_count: 1
INFO sufficient ClickhouseKeeper zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient ClickhouseServer zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CockroachDb zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CruciblePantry zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient InternalDns zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient ExternalDns zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Nexus zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
WARN cannot issue more MGS-driven updates (no current artifacts)
INFO all zones up-to-date
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're losing all these logs, can reconfigurator-cli blueprint-plan emit the planning report? I think being able to see it in the CI diffs would also help a lot with reviewing the Display impls (and might give us ideas for thinks we should add).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like that idea. It would also help in this PR to verify that the new reports include the same info that we had in the logs before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, f0aabe5 adds the report to the end of blueprint display, and also to the message returned by reconfigurator-cli::cmd_blueprint_plan.

generated blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1 based on parent blueprint dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21
planning report for blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1:
chicken switches:
add zones with mupdate override: false

* no zpools in service for NTP zones on sleds: 00320471-945d-413c-85e7-03e091a70b3c
* discretionary zone placement waiting for NTP zones on sleds: 00320471-945d-413c-85e7-03e091a70b3c


> blueprint-show 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1
blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1
Expand Down Expand Up @@ -283,4 +277,12 @@ parent: dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21

PENDING MGS-MANAGED UPDATES: 0

planning report for blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1:
chicken switches:
add zones with mupdate override: false

* no zpools in service for NTP zones on sleds: 00320471-945d-413c-85e7-03e091a70b3c
* discretionary zone placement waiting for NTP zones on sleds: 00320471-945d-413c-85e7-03e091a70b3c



46 changes: 22 additions & 24 deletions dev-tools/reconfigurator-cli/tests/output/cmds-example-stdout
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a.




> inventory-generate
Expand Down Expand Up @@ -518,6 +521,9 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a.




> # Exercise `blueprint-diff` arguments.
Expand All @@ -544,21 +550,20 @@ T ENA ID PARENT

> blueprint-plan ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
INFO skipping noop image source check for all sleds, reason: no target release is currently set
INFO found sled missing NTP zone (will add one), sled_id: 89d02b1b-478c-401a-8e28-7a26f74fa41b
INFO sufficient BoundaryNtp zones exist in plan, desired_count: 0, current_count: 0
WARN failed to place all new desired Clickhouse zones, placed: 0, wanted_to_place: 1
INFO sufficient ClickhouseKeeper zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient ClickhouseServer zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CockroachDb zones exist in plan, desired_count: 0, current_count: 0
WARN failed to place all new desired CruciblePantry zones, placed: 0, wanted_to_place: 3
WARN failed to place all new desired InternalDns zones, placed: 0, wanted_to_place: 3
INFO sufficient ExternalDns zones exist in plan, desired_count: 0, current_count: 0
WARN failed to place all new desired Nexus zones, placed: 0, wanted_to_place: 3
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
WARN cannot issue more MGS-driven updates (no current artifacts)
INFO some zones not yet up-to-date, sled_id: 89d02b1b-478c-401a-8e28-7a26f74fa41b, zones_currently_updating: [ZoneCurrentlyUpdating { zone_id: b3c9c041-d2f0-4767-bdaf-0e52e9d7a013 (service), zone_kind: InternalNtp, reason: MissingInInventory { bp_image_source: InstallDataset } }]
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
generated blueprint 86db3308-f817-4626-8838-4085949a6a41 based on parent blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
planning report for blueprint 86db3308-f817-4626-8838-4085949a6a41:
chicken switches:
add zones with mupdate override: false

* discretionary zone placement waiting for NTP zones on sleds: 89d02b1b-478c-401a-8e28-7a26f74fa41b
* missing NTP zone on sled 89d02b1b-478c-401a-8e28-7a26f74fa41b
* only placed 0/1 desired clickhouse zones
* only placed 0/3 desired crucible_pantry zones
* only placed 0/3 desired internal_dns zones
* only placed 0/3 desired nexus zones


> blueprint-list
T ENA ID PARENT TIME_CREATED
Expand Down Expand Up @@ -1030,6 +1035,9 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a.



> inventory-show latest all
collection: 9e187896-7809-46d0-9210-d75be1b3c4d4
Expand Down Expand Up @@ -1575,20 +1583,10 @@ INTERNAL DNS STATUS
> # sled to be expunged.
> blueprint-plan latest
INFO skipping noop image source check for all sleds, reason: no target release is currently set
INFO sufficient BoundaryNtp zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient Clickhouse zones exist in plan, desired_count: 1, current_count: 1
INFO sufficient ClickhouseKeeper zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient ClickhouseServer zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CockroachDb zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CruciblePantry zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient InternalDns zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient ExternalDns zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Nexus zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
WARN cannot issue more MGS-driven updates (no current artifacts)
INFO all zones up-to-date
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
generated blueprint 86db3308-f817-4626-8838-4085949a6a41 based on parent blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
empty planning report for blueprint 86db3308-f817-4626-8838-4085949a6a41.


> blueprint-diff ade5749d-bdf3-4fab-a8ae-00bea01b3a5a latest
from: blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ parent: 06c88262-f435-410e-ba98-101bed41ec27

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint 3f00b694-1b16-4aaa-8f78-e6b3a527b434.



> blueprint-edit 3f00b694-1b16-4aaa-8f78-e6b3a527b434 expunge-zone 8429c772-07e8-40a6-acde-2ed47d16cf84
blueprint 366b0b68-d80e-4bc1-abd3-dc69837847e0 created from blueprint 3f00b694-1b16-4aaa-8f78-e6b3a527b434: expunged zone 8429c772-07e8-40a6-acde-2ed47d16cf84 from sled 711ac7f8-d19e-4572-bdb9-e9b50f6e362a
Expand Down Expand Up @@ -1022,24 +1025,23 @@ parent: 3f00b694-1b16-4aaa-8f78-e6b3a527b434

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint 366b0b68-d80e-4bc1-abd3-dc69837847e0.



> # blueprint-plan will place a new external DNS zone, diff DNS to see the new zone has `ns<N>` and NS records.
> blueprint-plan 366b0b68-d80e-4bc1-abd3-dc69837847e0
INFO skipping noop image source check for all sleds, reason: no target release is currently set
INFO sufficient BoundaryNtp zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient Clickhouse zones exist in plan, desired_count: 1, current_count: 1
INFO sufficient ClickhouseKeeper zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient ClickhouseServer zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CockroachDb zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CruciblePantry zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient InternalDns zones exist in plan, desired_count: 3, current_count: 3
INFO added zone to sled, sled_id: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a, kind: ExternalDns
INFO sufficient Nexus zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
WARN cannot issue more MGS-driven updates (no current artifacts)
INFO some zones not yet up-to-date, sled_id: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a, zones_currently_updating: [ZoneCurrentlyUpdating { zone_id: fe2d5287-24e3-4071-b214-2640b097a759 (service), zone_kind: ExternalDns, reason: MissingInInventory { bp_image_source: InstallDataset } }]
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
generated blueprint 9c998c1d-1a7b-440a-ae0c-40f781dea6e2 based on parent blueprint 366b0b68-d80e-4bc1-abd3-dc69837847e0
planning report for blueprint 9c998c1d-1a7b-440a-ae0c-40f781dea6e2:
chicken switches:
add zones with mupdate override: false

* discretionary zones placed:
* 1 zone on sled 711ac7f8-d19e-4572-bdb9-e9b50f6e362a: external_dns
* zone updates waiting on discretionary zones


> blueprint-diff 366b0b68-d80e-4bc1-abd3-dc69837847e0 9c998c1d-1a7b-440a-ae0c-40f781dea6e2
from: blueprint 366b0b68-d80e-4bc1-abd3-dc69837847e0
Expand Down Expand Up @@ -1726,6 +1728,15 @@ parent: 366b0b68-d80e-4bc1-abd3-dc69837847e0

PENDING MGS-MANAGED UPDATES: 0

planning report for blueprint 9c998c1d-1a7b-440a-ae0c-40f781dea6e2:
chicken switches:
add zones with mupdate override: false

* discretionary zones placed:
* 1 zone on sled 711ac7f8-d19e-4572-bdb9-e9b50f6e362a: external_dns
* zone updates waiting on discretionary zones



> # expunging the new zone should work, then diff again to see the new zone also have its DNS records removed.
> blueprint-edit 9c998c1d-1a7b-440a-ae0c-40f781dea6e2 expunge-zone 8c0a1969-15b6-4165-ba6d-a27c24151037
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ parent: 184f10b3-61cb-41ef-9b93-3489b2bac559

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21.



> # Expunge an internal DNS zone
> blueprint-edit dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21 expunge-zone 99e2f30b-3174-40bf-a78a-90da8abba8ca
Expand Down Expand Up @@ -1043,20 +1046,16 @@ external DNS:
> # Planning a new blueprint will now replace the expunged zone, with new records for its replacement.
> blueprint-plan 58d5e830-0884-47d8-a7cd-b2b3751adeb4
INFO skipping noop image source check for all sleds, reason: no target release is currently set
INFO sufficient BoundaryNtp zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient Clickhouse zones exist in plan, desired_count: 1, current_count: 1
INFO sufficient ClickhouseKeeper zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient ClickhouseServer zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CockroachDb zones exist in plan, desired_count: 0, current_count: 0
INFO sufficient CruciblePantry zones exist in plan, desired_count: 3, current_count: 3
INFO added zone to sled, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, kind: InternalDns
INFO sufficient ExternalDns zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Nexus zones exist in plan, desired_count: 3, current_count: 3
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
WARN cannot issue more MGS-driven updates (no current artifacts)
INFO some zones not yet up-to-date, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, zones_currently_updating: [ZoneCurrentlyUpdating { zone_id: e375dd21-320b-43b7-bc92-a2c3dac9d9e1 (service), zone_kind: InternalDns, reason: MissingInInventory { bp_image_source: InstallDataset } }]
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
generated blueprint af934083-59b5-4bf6-8966-6fb5292c29e1 based on parent blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4
planning report for blueprint af934083-59b5-4bf6-8966-6fb5292c29e1:
chicken switches:
add zones with mupdate override: false

* discretionary zones placed:
* 1 zone on sled 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c: internal_dns
* zone updates waiting on discretionary zones


> blueprint-diff 58d5e830-0884-47d8-a7cd-b2b3751adeb4 af934083-59b5-4bf6-8966-6fb5292c29e1
from: blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,9 @@ parent: 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4.




> # Restore A to "current contents"
Expand Down Expand Up @@ -1419,4 +1422,7 @@ parent: af934083-59b5-4bf6-8966-6fb5292c29e1

PENDING MGS-MANAGED UPDATES: 0

empty planning report for blueprint df06bb57-ad42-4431-9206-abff322896c7.



Loading
Loading