Skip to content

nexus: prune old blueprints - #10309

Merged
davepacheco merged 25 commits into
mainfrom
dap/blueprint-archive-prune
Sep 3, 2026
Merged

nexus: prune old blueprints#10309
davepacheco merged 25 commits into
mainfrom
dap/blueprint-archive-prune

Conversation

@davepacheco

@davepacheco davepacheco commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Depends on #11203. Part of #7278. This adds a new background task that prunes old blueprints and bp_target rows. This does work, but there's still some work I want to do here:

  • clean up datastore interface to be a little less dangerous (see XXX-dap)
  • add some reconfigurator config controls
  • figure out if there are more automated tests to add

@davepacheco
davepacheco force-pushed the dap/blueprint-archive-prune branch from cf54f5c to 4c4454f Compare April 22, 2026 04:13
@davepacheco
davepacheco marked this pull request as ready for review August 31, 2026 20:18
@davepacheco

Copy link
Copy Markdown
Collaborator Author

This is ready for review. It's pretty big but I'm not sure how to usefully split it up. Suggestions welcome. Right now, it's +3,236/-35 LOC. Of that: 1,800 LOC is wholly new test code, split into about 500 LOC for the datastore interfaces and the rest for the pruner task itself.

@davepacheco
davepacheco changed the base branch from main to dap/blueprint-prune-datastore August 31, 2026 20:49
@jgallagher
jgallagher self-requested a review September 1, 2026 21:10

@jgallagher jgallagher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great; mostly questions and nits.

Should we also update the wording in the reconfigurator ops guide about people being expected to clean up blueprints after updates? https://github.com/oxidecomputer/omicron/blob/f93149ec58dba4c1f8ebc6c6a4c720f14d85cdbe/docs/reconfigurator-ops-guide.adoc#73-debugging-planner-error-about-too-many-blueprints

//! - These may have been created by a human who imported the blueprint or
//! ran the planner explicitly, but then never made it the target.
//!
//! Both of these cases should be uncommon enough that we can ignore them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In terms of quantity, I agree with this, with maybe a tiny caveat that if there is (or becomes) some way for the planner to get wedged strangely where it's creating blueprints, not making them the target, but not deleting them, we could get more than we expect here.

However, I have a vague concern that we might at some point start to assume "we've been pruning blueprints for a while, so we must not have any blueprints that predate SOME_CONDITION". That's the kind of assumption we generally try not to make without strong evidence, I think, but it still happens. (I'm thinking of the assumption around the bootstore we had recently that removed compatibility with a version that was like 10 releases old, but it turned out we had a customer or two that had never made any network config changes and the bootstore didn't self-update, so their bootstore was still relying on that compatibility.)

I don't want to block this PR on this, certainly, but I wonder if it's worth filing an issue for this, at least? Off the top of my head the thing I'd propose is that we could probably safely prune any blueprint satisfying:

  1. it's not in bp_target
  2. its parent is not in bp_target
  3. its parent blueprint has been deleted

1 gets us "all the blueprints that won't be pruned by this task"; 2 keeps us from deleting a blueprint that's potentially going to be made the next target; 3 keeps us from deleting a chain of blueprints that were manually created/uploaded that could be made the target (as long as that chain were created in order).

KeepWhat::StartingFromVersion(version) => {
info!(
log,
"will prune blueprints up through version";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit - this is only true if we don't hit max_delete_attempts first, right? I'm not sure what to suggest wording-wise; maybe something like "found max version of pruneable blueprints"?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reworded.

"blueprint_id" => blueprint_id.to_string(),
);

match datastore.blueprint_delete(opctx, &authz_blueprint).await {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we have a series of same-blueprint target rows (i.e., from toggling enabled), are we relying on falling into the "blueprint already deleted" result of this query? Is it worth keeping track of blueprints we've already deleted to avoid that? Actually, I guess we'd only need to keep track of the most-recently-deleted blueprint and check if the next row is still the same?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We are relying on that (intentionally). We could avoid the call, but there's not much downside and I'd rather keep the logic simpler.

// clones to generate the same random sequences). Really what
// we need is an interface through which the builder has a
// mutable borrow of the RNG or else returns it back to us when
// it's done.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you want to add a builder.build_returning_rng() that gives back both the new blueprint and ownership of the rng?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Something like that would work, yeah.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Did this in a new PR: #11227.

// should never do this. However, if we're not careful, this kind of
// corruption could cause the pruner to delete the system's current
// target blueprint, which would be so bad that we go out of our way to
// make sure we never do that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we talked about this but just confirming - the pruner checking for this is itself an extra safety on top of blueprint_delete() already refusing to delete the current target, right? That might be worth noting in this (otherwise very-scary-sounding) comment?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, there are at least three layers preventing this: blueprint_delete() itself, the check inside the pruner ahead of the call to blueprint_delete() (which is what this is exercising), and the fact that determine_pruneable should never report the current target as pruneable.

I'll rewrite this comment to explain it better.

The following is a lot more detail than you need but I already wrote it and it seemed worth putting somewhere.


To be clear, there are two different things that would be very bad: deleting a blueprint that is currently the target (whether or not you delete the last bp_target row) and deleting the last row in the bp_target table (even if the blueprint that was the latest target were still around).

In terms of deleting the blueprint itself:

  • blueprint_delete() has a last-ditch check to make sure you don't try to delete the blueprint itself that is referenced by the last row in the bp_target table.
  • The only thing calling this is the pruner, which uses determine_pruneable first to figure out what it can delete, and determine_pruneable is written to keep the last N blueprints, and N is a compile-time NonZero. So it should never report that you can delete the target itself. (But see below.)
  • Right before calling blueprint_delete(), there's an emergency check in prune_batch_blueprints_impl that the pruner isn't trying to delete the target blueprint. This would catch a theoretical case where the nkeep version logic in determine_pruneable had a bug, as long as the logic to determine "what is the current target blueprint" was still correct. (Perhaps unlikely, but easy enough to check.)

In terms of deleting the last row in the bp_target table:

  • You'd have to be using bp_target_delete_up_to, which requires the return value from determine_pruneable, which has the safeguard above.
  • bp_target_delete_up_to also has an emergency check that it's not somehow deleting the last row.

You could kind of divide these into "policy choices enforced by using determine_pruneable" and "emergency checks in case everything else went wrong".

This test is arguably dubious. I'm trying to exercise one of the emergency checks by constructing a kind of database broken-ness that would fool the determine_pruneable safeguard. Namely, that function's correctness depends on the fact that if a blueprint A appears in bp_target followed by a different blueprint B, then A will never appear at some later point in the sequence. That should be true. This test invalidates that in a way that, without the emergency checks, would cause the pruner to delete the actual target blueprint (because it found the earlier reference).

/// count of `bp_target` rows deleted
pub ntargets_deleted: usize,
/// warnings encountered while pruning
pub warnings: Vec<String>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be errors? This is populated by PruneTracker::errors, and if we have a (non-spurious) error deleting a blueprint, we may stay stuck on it indefinitely, since it'll always be the oldest one we try to delete?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure. I didn't want people to mistakenly think that some deletion hadn't also happened if these were encountered, but I've updated the field name and documented that.

Comment thread nexus/src/app/background/tasks/blueprint_pruner.rs Outdated
Comment thread nexus/src/app/background/tasks/blueprint_pruner.rs Outdated
@davepacheco

Copy link
Copy Markdown
Collaborator Author

Looks great; mostly questions and nits.

Should we also update the wording in the reconfigurator ops guide about people being expected to clean up blueprints after updates? https://github.com/oxidecomputer/omicron/blob/f93149ec58dba4c1f8ebc6c6a4c720f14d85cdbe/docs/reconfigurator-ops-guide.adoc#73-debugging-planner-error-about-too-many-blueprints

I did this in a separate PR (#11224) so we could iterate on the wording there -- thanks for the quick review!

Base automatically changed from dap/blueprint-prune-datastore to main September 2, 2026 23:03

@davepacheco davepacheco left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think I've addressed all the feedback here and could use a (hopefully quick) re-review. Thanks!

@davepacheco

Copy link
Copy Markdown
Collaborator Author

I did some manual testing on the berlin racklette today.

  • Used fridge to install and clean-slate with commit e1b07ab (tip of this branch)
  • Did mupdate recovery
  • Did a complete self-service update to commit 3e1b00f (from one of the PR branches that depends on this one and has no functional changes), just to create a bunch of blueprints. I realized later I could have just generated new noop blueprints instead.
  • Verified a bunch of cases:
    • pruner does nothing when there's nothing to do
    • pruner does prune to the limit when it should
    • pruner does nothing when disabled
    • pruner works even when some blueprints are missing
      • whether they're at the beginning of bp_target or in the nkeep range

This is all tested in the automated tests but I wanted to smoke test them on a real system in case I'd missed some way in which real systems look different than the test suite.

Details

Initial state

[berlin]root@oxz_switch1:~# omdb nexus background-tasks show blueprint_pruner
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:101::5]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 5, triggered by a periodic timer firing
    started at 2026-09-03T15:02:00.296Z (315s ago) and ran for 99ms
    status: enabled
    blueprints kept by policy: 5
    bp_target rows that can be deleted: 0
    bp_target rows deleted: 0
    blueprints deleted: 0
    errors: 0

Here's the state after the upgrade:

[berlin]root@oxz_switch1:~# omdb reconfigurator history
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
VERSN TIME                     BLUEPRINT
    1 2026-09-03T14:33:28.327Z b84ba8ee-501f-4bf5-ab6a-a9d42cb2d86c  enabled: initial blueprint from rack setup
    2 2026-09-03T14:33:30.199Z 04d6f81d-cdc7-42d4-a984-9b1404bedef3  enabled: updated target release minimum generation from 1 to 2
    3 2026-09-03T14:33:39.751Z 68edab8e-b9bf-4e30-accc-99f0d5a8306d  enabled:
    4 2026-09-03T14:33:40.598Z 27b0686b-96c8-4207-a2e2-851321d66e0e  enabled:
    5 2026-09-03T14:33:43.716Z 9495328d-36fa-403a-9c35-808eea022ec4  enabled:
    6 2026-09-03T15:04:00.253Z 6acd9dab-5d00-4a1c-8cf4-e864f81347a1  enabled: sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: performed all noop measurements updates, sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: performed 15 noop zone image source updates, sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: noop updated host phase 2 to Artifact: both slot A and slot B, sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: performed all noop measurements updates, sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: performed 15 noop zone image source updates, sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: noop updated host phase 2 to Artifact: both slot A and slot B, sled e9e0e19d-280e-4848-b196-47d5c50feb1a: performed all noop measurements updates, sled e9e0e19d-280e-4848-b196-47d5c50feb1a: performed 14 noop zone image source updates, sled e9e0e19d-280e-4848-b196-47d5c50feb1a: noop updated host phase 2 to Artifact: both slot A and slot B, sled f9de65ef-2248-4b9b-9a9a-b89136184b87: performed all noop measurements updates, sled f9de65ef-2248-4b9b-9a9a-b89136184b87: performed 16 noop zone image source updates, sled f9de65ef-2248-4b9b-9a9a-b89136184b87: noop updated host phase 2 to Artifact: both slot A and slot B
    7 2026-09-03T15:08:29.997Z 681f5e4a-f73a-4cfa-a9f1-8cde322b8052  enabled: update Sled 17 (271FVPY0) host OS to 23.0.0-0.ci+git3e1b00f99b8
    8 2026-09-03T15:14:51.560Z 7fb16cae-b961-47ab-bc6e-9325aae32051  enabled:
    9 2026-09-03T15:17:46.479Z fa4bdf1a-ad8b-4b4d-9df8-6af194901772  enabled: update Sled 14 (BRM42220011) host OS to 23.0.0-0.ci+git3e1b00f99b8
   10 2026-09-03T15:23:48.802Z b915e490-aa87-44f2-9df2-93ba08e9a1c8  enabled:
   11 2026-09-03T15:24:46.471Z c07ef817-3e0f-4829-b393-32f9252ece55  enabled: update Sled 16 (BRM42220082) host OS to 23.0.0-0.ci+git3e1b00f99b8
   12 2026-09-03T15:30:59.526Z f5741410-82da-4129-97a3-d8b8cfcbf516  enabled:
   13 2026-09-03T15:31:24.438Z 51729bcc-eaa6-4dec-a012-39b702ce7a35  enabled: update Sled 15 (BRM44220007) host OS to 23.0.0-0.ci+git3e1b00f99b8
   14 2026-09-03T15:37:10.787Z b37d3112-0878-4ac2-a9c4-9a7461be367a  enabled:
   15 2026-09-03T15:38:39.758Z dcce3269-9945-468d-923a-00edfe51444e  enabled: updating Crucible zone 1dcf54d5-b0dd-4889-8df8-9e0e938c9f3f in-place
   16 2026-09-03T15:39:00.241Z 52773286-f1a6-472f-81d2-6fd302bf4c47  enabled: updating CockroachDb zone 09f506e8-3e87-41ae-a042-d3a8d4674c6f in-place
   17 2026-09-03T15:39:24.537Z bab5fa26-23e3-4b8f-af1e-f7ce185178af  enabled: updating Crucible zone 25617b9f-8f59-48b8-b5a0-3e8bb9c98955 in-place
   18 2026-09-03T15:39:37.177Z 122b10f8-ae04-4503-9ade-3974450bc3ab  enabled: updating Crucible zone 2e0305d7-caf8-41ca-b976-13aae8f02148 in-place
   19 2026-09-03T15:39:51.973Z 32918a5d-8001-445f-8c30-a88ca5d1437b  enabled: updating Crucible zone 450e4acf-1684-4f9f-a185-b035936ac08e in-place
   20 2026-09-03T15:40:11.773Z 77e0b6a3-7b05-497f-84a9-778e0902cfb2  enabled: expunge InternalDns zone 46f6123e-7674-4416-b8a7-77b3380515a1 for update
   21 2026-09-03T15:40:12.655Z 445873e8-1d80-441a-aebc-e678801d0c5b  enabled: expunge BoundaryNtp zone 475b2f0c-6b9d-4585-a6fd-9275574830b2 for update
   22 2026-09-03T15:40:14.061Z 2fe3ff9c-0ad3-4450-a522-fbc9a3fbc465  enabled: sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: added zone: internal_ntp
   23 2026-09-03T15:40:29.966Z 8d633405-fc94-4250-a1df-59da9c2384b6  enabled:
   24 2026-09-03T15:40:40.529Z 02fccc51-ff2c-4604-a0e3-a6ad6b951365  enabled: updating Crucible zone 77da2fcd-e9b6-4971-8e2a-5b513a7a5cf5 in-place
   25 2026-09-03T15:40:52.841Z f2e1a323-e3d5-432e-9877-88009cf2815e  enabled: updating Crucible zone 7e001040-fabf-47aa-a7e2-c8caf59ee595 in-place
   26 2026-09-03T15:41:11.790Z e93cd5cb-6ee6-40ac-9bb3-239848cdf8e8  enabled: updating Crucible zone 959bbfa1-5909-4a55-8637-7f650c95b8e0 in-place
   27 2026-09-03T15:41:22.465Z b780732b-ac22-4160-83a1-c61e05809b40  enabled: updating Crucible zone 96421e21-e2dd-432d-8552-64cd23e21454 in-place
   28 2026-09-03T15:41:34.005Z d3446085-04a5-4ccf-a32b-41614a830d68  enabled: updating Crucible zone a39fb8c5-7b6e-4ff6-92a1-734ef1725d26 in-place
   29 2026-09-03T15:41:50.069Z 2271fdfc-8b8c-466e-b2eb-4471a1e928a5  enabled: expunge CruciblePantry zone bc2f6146-98a0-40ff-8c27-48507e9eabb4 for update
   30 2026-09-03T15:41:50.563Z 867db5c7-f806-4292-b679-39a1b2554bda  enabled:
   31 2026-09-03T15:41:53.947Z d3424a37-0e66-4e0a-96bc-569261d9e54a  enabled:
   32 2026-09-03T15:42:04.716Z 1656f177-b182-4679-8190-8105ecc05f2e  enabled: expunge ExternalDns zone fd9956d3-00cb-4f93-8d05-1b51fd0ced44 for update
   33 2026-09-03T15:42:05.663Z 5641feef-a510-41bf-a0f8-88220f1c0104  enabled:
   34 2026-09-03T15:42:11.041Z 678b4b86-7cf3-4cc7-a630-b09fba6b2e0e  enabled:
   35 2026-09-03T15:42:19.976Z b1159174-9198-4e27-a11b-a09aca1dc583  enabled: updating Crucible zone 0721b0e2-29e2-4a27-94d8-81faae38e37c in-place
   36 2026-09-03T15:42:32.846Z af0ba60b-aa1f-425b-b665-9916168a9c61  enabled: updating Crucible zone 0e0bb1fb-885c-4966-b726-ba081111558b in-place
   37 2026-09-03T15:42:51.549Z 271629b3-dac6-44f4-be45-7fe2b0a6a758  enabled: updating Crucible zone 154df9c8-9df3-4858-b2b9-9aecd2c677ec in-place
   38 2026-09-03T15:43:07.182Z f074bfd1-7b53-469c-ba35-a793cefa536c  enabled: expunge BoundaryNtp zone 25f7b637-8031-4329-bb0b-3ff43d30335d for update
   39 2026-09-03T15:43:07.766Z f774e558-986f-4e5e-bbdf-93cb62015289  enabled: sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: added zone: internal_ntp
   40 2026-09-03T15:43:27.012Z 541c1960-7ffd-4597-8fc8-7b3af7c994cc  enabled: updating Crucible zone 31a762f9-27e2-4a86-9033-949db723e754 in-place
   41 2026-09-03T15:43:39.358Z 7ada0af6-2e6e-4f89-8e2c-4d475b58c9bc  enabled: expunge ExternalDns zone 3769da2b-b221-4479-8110-9fa82ee1b342 for update
   42 2026-09-03T15:43:39.874Z 9d1a47ee-78ce-4a78-91f1-f7a12a12c3bc  enabled:
   43 2026-09-03T15:43:50.852Z 79516b41-9d99-44cc-a923-9ed89ceb1356  enabled:
   44 2026-09-03T15:43:56.509Z a9ac4515-97a1-4f23-b77e-e2603baca216  enabled: updating CockroachDb zone 38c79cfe-9bee-4e26-a6e0-fa74c1a70490 in-place
   45 2026-09-03T15:44:21.068Z 56db9633-1d45-4558-9d82-73c3c9fda0e8  enabled: updating Crucible zone 472357a3-f8e1-4d67-a82c-ee594e92c87c in-place
   46 2026-09-03T15:44:41.713Z 6238d951-8218-48b3-8644-03ad4f9b6876  enabled: updating Crucible zone 5b512bde-ae30-4080-9adb-a3c9fd67d1ce in-place
   47 2026-09-03T15:44:57.118Z 0716ee1b-f87e-4892-8710-6a6dce029117  enabled: updating Crucible zone 9b3c0364-54a5-452b-8b3e-31a87ea1e4ca in-place
   48 2026-09-03T15:45:09.435Z 565d9653-0271-4a33-897e-316897e9e262  enabled: updating Crucible zone a604c919-dd05-407e-b50c-e72bac695ca0 in-place
   49 2026-09-03T15:45:21.644Z 0737799c-6574-4e42-b53a-03f336920d52  enabled: updating Crucible zone c5eba184-bb59-4f83-8fdb-2b6526bfe2fc in-place
   50 2026-09-03T15:45:33.185Z 03c21f59-19e1-43ff-8e7d-eb203310d666  enabled: expunge InternalDns zone efe9c5df-98f0-4a52-af1c-0dd3c1018709 for update
   51 2026-09-03T15:45:34.096Z cfa107df-7933-4cc2-90d7-768f45241768  enabled: expunge CruciblePantry zone f4c335c7-eeb6-4f3c-9646-d8f866d7581f for update
   52 2026-09-03T15:45:34.866Z cf28cd1e-1488-412c-bb42-8bd6fec81089  enabled:
   53 2026-09-03T15:45:39.844Z b49c6490-0998-4b01-be60-e8f899275445  enabled:
   54 2026-09-03T15:45:57.350Z 818046e1-0804-48dc-8037-5688b05b2184  enabled:
   55 2026-09-03T15:46:07.329Z cc1549b3-368f-4b65-9baf-ab3c8868e3ec  enabled: updating Crucible zone 0414368f-cfdd-45de-b1c2-e4e29063f502 in-place
   56 2026-09-03T15:46:21.528Z 4d39ac4c-7cd0-4965-8372-dae2c7734ac4  enabled: updating Crucible zone 0a07b667-93c0-4b10-9d4c-fc53c8a51004 in-place
   57 2026-09-03T15:46:33.079Z 9c5105e7-3029-4281-b958-f864d81f50ff  enabled: updating Crucible zone 102195d0-3339-4bd2-a74b-5ca6ed606007 in-place
   58 2026-09-03T15:46:50.376Z 80b78ae0-2287-46d6-9a88-97586770b4eb  enabled: updating Crucible zone 2fae068d-3c35-4eae-9a67-c381d4084296 in-place
   59 2026-09-03T15:47:07.232Z 220ecfd5-f692-46f4-b932-bc3732030df4  enabled: updating Clickhouse zone 3b503f54-0a3c-452f-b5b9-c61ab3c59386 in-place
   60 2026-09-03T15:47:40.496Z 22ad2e64-7152-437d-9b48-4b5de2c14339  enabled: updating Crucible zone 4f89610d-3540-4079-9235-ec3e9b544b56 in-place
   61 2026-09-03T15:47:52.654Z 35d7b49b-8019-4460-be7e-7f4b84e9d3f8  enabled: updating Crucible zone 55b66ad2-df84-4095-96fb-b8a52590cabc in-place
   62 2026-09-03T15:48:11.350Z b7cfe232-ed84-40ce-8700-3f89a6cfef19  enabled: updating CockroachDb zone 5c171a6d-808a-4fa1-8e55-6531bf6a8dcf in-place
   63 2026-09-03T15:48:24.145Z d5a0d5ad-0d97-4c29-acdf-7a2dcfa79016  enabled: updating Crucible zone 649f9d77-99e7-4ab5-a5e8-ab6c09fb12bf in-place
   64 2026-09-03T15:48:37.510Z 475ff728-76f0-4417-853d-295b554e9c41  enabled: updating Crucible zone b52531fc-9f6e-4dce-9591-f94979a98b83 in-place
   65 2026-09-03T15:48:50.197Z 3de9b931-f46d-46a4-92a1-04c67713c5a6  enabled: updating CockroachDb zone 9995d066-2863-4dc4-815a-b82c5f77bcbb in-place
   66 2026-09-03T15:49:10.892Z bc6ff54b-813b-4225-861b-bf2ffc290016  enabled: updating Crucible zone dfa395f6-2ad5-419f-9bc6-a2af09015999 in-place
   67 2026-09-03T15:49:22.664Z 9505bbae-ab89-46e5-b47a-bc9f9622589c  enabled: updating Crucible zone 0c7ef14e-0abf-4f28-98cb-1dace3736d3f in-place
   68 2026-09-03T15:49:34.305Z 1c9635af-eaa7-44c9-900e-0a20ae5e68d4  enabled: updating CockroachDb zone 309f9bf0-ed2c-4a24-a09c-f22b89bd3ebd in-place
   69 2026-09-03T15:50:08.292Z 09ce326d-be80-407c-b8f8-58324d2e0225  enabled: updating Crucible zone 512345a6-96a0-4de2-8667-6bd7ae5b3f37 in-place
   70 2026-09-03T15:50:21.542Z e2e02086-ebd3-4189-8dc3-9611bc3d06bc  enabled: expunge Oximeter zone 57802fdd-32e6-4f40-9b9e-38d5e0f8057e for update
   71 2026-09-03T15:50:21.973Z fdd7419e-5407-4837-9650-a5f1c7f51e1b  enabled:
   72 2026-09-03T15:50:29.898Z 713f42f9-49fc-48e3-96e7-33fa933e7d6c  enabled:
   73 2026-09-03T15:50:41.749Z a531a138-4d68-4e2b-a9d8-96b3fc142257  enabled: updating Crucible zone 6543cbc1-3a3e-4b52-a5bb-df3ea2eb4602 in-place
   74 2026-09-03T15:50:52.998Z 1a7dbf15-6ec3-4c16-a009-51167198dfd2  enabled: updating Crucible zone 8074dad5-a5c3-414c-86ac-2eb4f4aea78f in-place
   75 2026-09-03T15:51:04.660Z 33324f3e-fb90-4567-8982-a015a90f0abe  enabled: updating Crucible zone 81cbb8e4-63ad-45d9-91df-0c60694fb16f in-place
   76 2026-09-03T15:51:21.726Z c93317a7-6e8e-4e47-b1c0-9b18580c3b1b  enabled: updating Crucible zone 9c12f2b9-4c0b-4c7f-b8d6-8122688acb25 in-place
   77 2026-09-03T15:51:34.590Z c3c5aec4-16e9-4cdd-be7f-34f5d810d0d6  enabled: updating Crucible zone a7035e47-7be1-407f-a6ef-91d04748bda8 in-place
   78 2026-09-03T15:51:50.019Z a93b6f58-2717-420b-b43c-00584022a14c  enabled: expunge CruciblePantry zone b075e434-f908-4c3c-b7dd-39051a3c56cf for update
   79 2026-09-03T15:51:50.623Z 772bef96-fb55-4793-bc13-466eb8570a20  enabled:
   80 2026-09-03T15:51:57.970Z d5aaee86-61c6-4865-8c26-76f09b1dbc03  enabled:
   81 2026-09-03T15:52:10.138Z 9f44e3d2-c113-4655-a282-f65ca4bcc339  enabled: expunge ExternalDns zone bcf4c91b-66ff-4243-8ca9-ec8d42b3c9dd for update
   82 2026-09-03T15:52:10.882Z dd061783-1bdb-4b3c-b786-7a6c47cd629c  enabled:
   83 2026-09-03T15:52:21.575Z cfef95b3-7018-415a-a994-9ad7b4891f7e  enabled: updating Crucible zone c3b99825-ad5d-4812-8840-349e202e4b35 in-place
   84 2026-09-03T15:52:33.302Z cb699c29-bfa3-4d0e-83c8-6f38c3d541c1  enabled: expunge InternalDns zone cc77f707-986f-4080-b445-4a753dcf53a1 for update
   85 2026-09-03T15:52:33.745Z 3ee8f07c-3629-4846-a274-f74cf85c5703  enabled: updating Crucible zone ef073fc8-6608-45a4-bd24-a0a0d579053c in-place
   86 2026-09-03T15:53:12.127Z d9b46ae8-4699-4db7-8ac4-6715b5ec5aca  enabled:
   87 2026-09-03T15:53:30.389Z 61407990-6444-4569-ba9c-37484ef69ae2  enabled: updating Crucible zone fd91fef8-43b2-4399-8922-5bb7b6e2fe53 in-place
   88 2026-09-03T15:53:31.029Z e9c90608-8214-4428-9b94-861bc81313a3  enabled:
   89 2026-09-03T15:53:53.012Z 1d74e61f-1397-4eb9-b62a-86d7aa73e203  enabled: updated nexus generation from 1 to 2
   90 2026-09-03T15:54:05.955Z cc7de331-9c9d-46aa-91d7-c22cf5d09b57  enabled: expunge Nexus zone 0d165c7e-d23b-4821-8aa8-7f923b81a331 for update
   91 2026-09-03T15:54:07.427Z 00e4d032-a274-4245-b882-2981ccb7a57b  enabled: expunge Nexus zone 296c9cbc-6a55-46ab-a4ea-60c84bb8c667 for update
   92 2026-09-03T15:54:08.187Z 27e1db53-e347-49e4-81f7-68439b38ad1d  enabled: expunge Nexus zone b4ba230a-a4a5-4581-a397-29b6f6d9ff68 for update
   93 2026-09-03T15:54:14.006Z c71ad319-35ab-4cab-96ae-8638341fbb03  enabled:
   94 2026-09-03T15:54:19.848Z 7295315e-01df-4e7b-950e-126b3b118f35  enabled:

That shows bp_target has 94 rows and there are 94 blueprints (this is off by one because of the header row):

[berlin]root@oxz_switch1:~# omdb nexus blueprints list | wc -l
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
      95

The pruner sees all 94 and prunes nothing:

[berlin]root@oxz_switch1:~# omdb nexus background-tasks show blueprint_pruner
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 2, triggered by a dependent task completing
    started at 2026-09-03T15:54:20.188Z (306s ago) and ran for 85ms
    status: enabled
    blueprints kept by policy: 94
    bp_target rows that can be deleted: 0
    bp_target rows deleted: 0
    blueprints deleted: 0
    errors: 0

Basic operation

Configure it to keep only 85. This should cause 9 to be pruned:

[berlin]root@oxz_switch1:~# omdb -w nexus reconfigurator-config set --blueprint-pruner-nkeep 85
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
reconfigurator config updated to version 1:
    tuf repo pruner enabled: true
    disruption policy: terminate
    planner enabled: true
    blueprint pruner enabled: true
    blueprint pruner nkeep: 85

We have to check all three Nexus instances to see what all the pruners did:

[berlin]root@oxz_switch1:~# for ip in fd85:375e:4c4d:104::12 fd85:375e:4c4d:102::14 fd85:375e:4c4d:103::16; do echo $ip; omdb nexus background-tasks show --nexus-internal-url http://[$ip]:12232 blueprint_pruner; echo; echo; done
fd85:375e:4c4d:104::12
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 12, triggered by a dependent task completing
    started at 2026-09-03T17:30:19.690Z (129s ago) and ran for 18ms
    status: enabled
    blueprints kept by policy: 85
    bp_target rows that can be deleted: 0
    bp_target rows deleted: 0
    blueprints deleted: 0
    errors: 0



fd85:375e:4c4d:102::14
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 12, triggered by a dependent task completing
    started at 2026-09-03T17:30:20.461Z (128s ago) and ran for 71ms
    status: enabled
    blueprints kept by policy: 85
    bp_target rows that can be deleted: 0
    bp_target rows deleted: 0
    blueprints deleted: 0
    errors: 0



fd85:375e:4c4d:103::16
note: using Nexus URL http://[fd85:375e:4c4d:103::16]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 12, triggered by a dependent task completing
    started at 2026-09-03T17:30:17.346Z (131s ago) and ran for 530ms
    status: enabled
    blueprints kept by policy: 85
    bp_target rows that can be deleted: 9
    bp_target rows deleted: 9
    blueprints deleted: 9
        b84ba8ee-501f-4bf5-ab6a-a9d42cb2d86c (made target at 2026-09-03T14:33:28.327Z)
        04d6f81d-cdc7-42d4-a984-9b1404bedef3 (made target at 2026-09-03T14:33:30.199Z)
        68edab8e-b9bf-4e30-accc-99f0d5a8306d (made target at 2026-09-03T14:33:39.751Z)
        27b0686b-96c8-4207-a2e2-851321d66e0e (made target at 2026-09-03T14:33:40.598Z)
        9495328d-36fa-403a-9c35-808eea022ec4 (made target at 2026-09-03T14:33:43.716Z)
        6acd9dab-5d00-4a1c-8cf4-e864f81347a1 (made target at 2026-09-03T15:04:00.253Z)
        681f5e4a-f73a-4cfa-a9f1-8cde322b8052 (made target at 2026-09-03T15:08:29.997Z)
        7fb16cae-b961-47ab-bc6e-9325aae32051 (made target at 2026-09-03T15:14:51.560Z)
        fa4bdf1a-ad8b-4b4d-9df8-6af194901772 (made target at 2026-09-03T15:17:46.479Z)
    errors: 0


Good. 9 blueprints were pruned and they were the oldest 9. There are 9 fewer in the table:

[berlin]root@oxz_switch1:~# omdb nexus blueprints list | wc -l
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
      86

and they don't show up at all in omdb reconfigurator history:

[berlin]root@oxz_switch1:~# omdb reconfigurator history 
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
VERSN TIME                     BLUEPRINT                           
   10 2026-09-03T15:23:48.802Z b915e490-aa87-44f2-9df2-93ba08e9a1c8  enabled: 
   11 2026-09-03T15:24:46.471Z c07ef817-3e0f-4829-b393-32f9252ece55  enabled: update Sled 16 (BRM42220082) host OS to 23.0.0-0.ci+git3e1b00f99b8
   12 2026-09-03T15:30:59.526Z f5741410-82da-4129-97a3-d8b8cfcbf516  enabled: 
   13 2026-09-03T15:31:24.438Z 51729bcc-eaa6-4dec-a012-39b702ce7a35  enabled: update Sled 15 (BRM44220007) host OS to 23.0.0-0.ci+git3e1b00f99b8
   14 2026-09-03T15:37:10.787Z b37d3112-0878-4ac2-a9c4-9a7461be367a  enabled: 
   15 2026-09-03T15:38:39.758Z dcce3269-9945-468d-923a-00edfe51444e  enabled: updating Crucible zone 1dcf54d5-b0dd-4889-8df8-9e0e938c9f3f in-place
   16 2026-09-03T15:39:00.241Z 52773286-f1a6-472f-81d2-6fd302bf4c47  enabled: updating CockroachDb zone 09f506e8-3e87-41ae-a042-d3a8d4674c6f in-place
   17 2026-09-03T15:39:24.537Z bab5fa26-23e3-4b8f-af1e-f7ce185178af  enabled: updating Crucible zone 25617b9f-8f59-48b8-b5a0-3e8bb9c98955 in-place
   18 2026-09-03T15:39:37.177Z 122b10f8-ae04-4503-9ade-3974450bc3ab  enabled: updating Crucible zone 2e0305d7-caf8-41ca-b976-13aae8f02148 in-place
   19 2026-09-03T15:39:51.973Z 32918a5d-8001-445f-8c30-a88ca5d1437b  enabled: updating Crucible zone 450e4acf-1684-4f9f-a185-b035936ac08e in-place
   20 2026-09-03T15:40:11.773Z 77e0b6a3-7b05-497f-84a9-778e0902cfb2  enabled: expunge InternalDns zone 46f6123e-7674-4416-b8a7-77b3380515a1 for update
   21 2026-09-03T15:40:12.655Z 445873e8-1d80-441a-aebc-e678801d0c5b  enabled: expunge BoundaryNtp zone 475b2f0c-6b9d-4585-a6fd-9275574830b2 for update
   22 2026-09-03T15:40:14.061Z 2fe3ff9c-0ad3-4450-a522-fbc9a3fbc465  enabled: sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: added zone: internal_ntp
   23 2026-09-03T15:40:29.966Z 8d633405-fc94-4250-a1df-59da9c2384b6  enabled: 
   24 2026-09-03T15:40:40.529Z 02fccc51-ff2c-4604-a0e3-a6ad6b951365  enabled: updating Crucible zone 77da2fcd-e9b6-4971-8e2a-5b513a7a5cf5 in-place
   25 2026-09-03T15:40:52.841Z f2e1a323-e3d5-432e-9877-88009cf2815e  enabled: updating Crucible zone 7e001040-fabf-47aa-a7e2-c8caf59ee595 in-place
   26 2026-09-03T15:41:11.790Z e93cd5cb-6ee6-40ac-9bb3-239848cdf8e8  enabled: updating Crucible zone 959bbfa1-5909-4a55-8637-7f650c95b8e0 in-place
   27 2026-09-03T15:41:22.465Z b780732b-ac22-4160-83a1-c61e05809b40  enabled: updating Crucible zone 96421e21-e2dd-432d-8552-64cd23e21454 in-place
   28 2026-09-03T15:41:34.005Z d3446085-04a5-4ccf-a32b-41614a830d68  enabled: updating Crucible zone a39fb8c5-7b6e-4ff6-92a1-734ef1725d26 in-place
   29 2026-09-03T15:41:50.069Z 2271fdfc-8b8c-466e-b2eb-4471a1e928a5  enabled: expunge CruciblePantry zone bc2f6146-98a0-40ff-8c27-48507e9eabb4 for update
   30 2026-09-03T15:41:50.563Z 867db5c7-f806-4292-b679-39a1b2554bda  enabled: 
   31 2026-09-03T15:41:53.947Z d3424a37-0e66-4e0a-96bc-569261d9e54a  enabled: 
   32 2026-09-03T15:42:04.716Z 1656f177-b182-4679-8190-8105ecc05f2e  enabled: expunge ExternalDns zone fd9956d3-00cb-4f93-8d05-1b51fd0ced44 for update
   33 2026-09-03T15:42:05.663Z 5641feef-a510-41bf-a0f8-88220f1c0104  enabled: 
   34 2026-09-03T15:42:11.041Z 678b4b86-7cf3-4cc7-a630-b09fba6b2e0e  enabled: 
   35 2026-09-03T15:42:19.976Z b1159174-9198-4e27-a11b-a09aca1dc583  enabled: updating Crucible zone 0721b0e2-29e2-4a27-94d8-81faae38e37c in-place
   36 2026-09-03T15:42:32.846Z af0ba60b-aa1f-425b-b665-9916168a9c61  enabled: updating Crucible zone 0e0bb1fb-885c-4966-b726-ba081111558b in-place
   37 2026-09-03T15:42:51.549Z 271629b3-dac6-44f4-be45-7fe2b0a6a758  enabled: updating Crucible zone 154df9c8-9df3-4858-b2b9-9aecd2c677ec in-place
   38 2026-09-03T15:43:07.182Z f074bfd1-7b53-469c-ba35-a793cefa536c  enabled: expunge BoundaryNtp zone 25f7b637-8031-4329-bb0b-3ff43d30335d for update
   39 2026-09-03T15:43:07.766Z f774e558-986f-4e5e-bbdf-93cb62015289  enabled: sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: added zone: internal_ntp
   40 2026-09-03T15:43:27.012Z 541c1960-7ffd-4597-8fc8-7b3af7c994cc  enabled: updating Crucible zone 31a762f9-27e2-4a86-9033-949db723e754 in-place
   41 2026-09-03T15:43:39.358Z 7ada0af6-2e6e-4f89-8e2c-4d475b58c9bc  enabled: expunge ExternalDns zone 3769da2b-b221-4479-8110-9fa82ee1b342 for update
   42 2026-09-03T15:43:39.874Z 9d1a47ee-78ce-4a78-91f1-f7a12a12c3bc  enabled: 
   43 2026-09-03T15:43:50.852Z 79516b41-9d99-44cc-a923-9ed89ceb1356  enabled: 
   44 2026-09-03T15:43:56.509Z a9ac4515-97a1-4f23-b77e-e2603baca216  enabled: updating CockroachDb zone 38c79cfe-9bee-4e26-a6e0-fa74c1a70490 in-place
   45 2026-09-03T15:44:21.068Z 56db9633-1d45-4558-9d82-73c3c9fda0e8  enabled: updating Crucible zone 472357a3-f8e1-4d67-a82c-ee594e92c87c in-place
   46 2026-09-03T15:44:41.713Z 6238d951-8218-48b3-8644-03ad4f9b6876  enabled: updating Crucible zone 5b512bde-ae30-4080-9adb-a3c9fd67d1ce in-place
   47 2026-09-03T15:44:57.118Z 0716ee1b-f87e-4892-8710-6a6dce029117  enabled: updating Crucible zone 9b3c0364-54a5-452b-8b3e-31a87ea1e4ca in-place
   48 2026-09-03T15:45:09.435Z 565d9653-0271-4a33-897e-316897e9e262  enabled: updating Crucible zone a604c919-dd05-407e-b50c-e72bac695ca0 in-place
   49 2026-09-03T15:45:21.644Z 0737799c-6574-4e42-b53a-03f336920d52  enabled: updating Crucible zone c5eba184-bb59-4f83-8fdb-2b6526bfe2fc in-place
   50 2026-09-03T15:45:33.185Z 03c21f59-19e1-43ff-8e7d-eb203310d666  enabled: expunge InternalDns zone efe9c5df-98f0-4a52-af1c-0dd3c1018709 for update
   51 2026-09-03T15:45:34.096Z cfa107df-7933-4cc2-90d7-768f45241768  enabled: expunge CruciblePantry zone f4c335c7-eeb6-4f3c-9646-d8f866d7581f for update
   52 2026-09-03T15:45:34.866Z cf28cd1e-1488-412c-bb42-8bd6fec81089  enabled: 
   53 2026-09-03T15:45:39.844Z b49c6490-0998-4b01-be60-e8f899275445  enabled: 
   54 2026-09-03T15:45:57.350Z 818046e1-0804-48dc-8037-5688b05b2184  enabled: 
   55 2026-09-03T15:46:07.329Z cc1549b3-368f-4b65-9baf-ab3c8868e3ec  enabled: updating Crucible zone 0414368f-cfdd-45de-b1c2-e4e29063f502 in-place
   56 2026-09-03T15:46:21.528Z 4d39ac4c-7cd0-4965-8372-dae2c7734ac4  enabled: updating Crucible zone 0a07b667-93c0-4b10-9d4c-fc53c8a51004 in-place
   57 2026-09-03T15:46:33.079Z 9c5105e7-3029-4281-b958-f864d81f50ff  enabled: updating Crucible zone 102195d0-3339-4bd2-a74b-5ca6ed606007 in-place
   58 2026-09-03T15:46:50.376Z 80b78ae0-2287-46d6-9a88-97586770b4eb  enabled: updating Crucible zone 2fae068d-3c35-4eae-9a67-c381d4084296 in-place
   59 2026-09-03T15:47:07.232Z 220ecfd5-f692-46f4-b932-bc3732030df4  enabled: updating Clickhouse zone 3b503f54-0a3c-452f-b5b9-c61ab3c59386 in-place
   60 2026-09-03T15:47:40.496Z 22ad2e64-7152-437d-9b48-4b5de2c14339  enabled: updating Crucible zone 4f89610d-3540-4079-9235-ec3e9b544b56 in-place
   61 2026-09-03T15:47:52.654Z 35d7b49b-8019-4460-be7e-7f4b84e9d3f8  enabled: updating Crucible zone 55b66ad2-df84-4095-96fb-b8a52590cabc in-place
   62 2026-09-03T15:48:11.350Z b7cfe232-ed84-40ce-8700-3f89a6cfef19  enabled: updating CockroachDb zone 5c171a6d-808a-4fa1-8e55-6531bf6a8dcf in-place
   63 2026-09-03T15:48:24.145Z d5a0d5ad-0d97-4c29-acdf-7a2dcfa79016  enabled: updating Crucible zone 649f9d77-99e7-4ab5-a5e8-ab6c09fb12bf in-place
   64 2026-09-03T15:48:37.510Z 475ff728-76f0-4417-853d-295b554e9c41  enabled: updating Crucible zone b52531fc-9f6e-4dce-9591-f94979a98b83 in-place
   65 2026-09-03T15:48:50.197Z 3de9b931-f46d-46a4-92a1-04c67713c5a6  enabled: updating CockroachDb zone 9995d066-2863-4dc4-815a-b82c5f77bcbb in-place
   66 2026-09-03T15:49:10.892Z bc6ff54b-813b-4225-861b-bf2ffc290016  enabled: updating Crucible zone dfa395f6-2ad5-419f-9bc6-a2af09015999 in-place
   67 2026-09-03T15:49:22.664Z 9505bbae-ab89-46e5-b47a-bc9f9622589c  enabled: updating Crucible zone 0c7ef14e-0abf-4f28-98cb-1dace3736d3f in-place
   68 2026-09-03T15:49:34.305Z 1c9635af-eaa7-44c9-900e-0a20ae5e68d4  enabled: updating CockroachDb zone 309f9bf0-ed2c-4a24-a09c-f22b89bd3ebd in-place
   69 2026-09-03T15:50:08.292Z 09ce326d-be80-407c-b8f8-58324d2e0225  enabled: updating Crucible zone 512345a6-96a0-4de2-8667-6bd7ae5b3f37 in-place
   70 2026-09-03T15:50:21.542Z e2e02086-ebd3-4189-8dc3-9611bc3d06bc  enabled: expunge Oximeter zone 57802fdd-32e6-4f40-9b9e-38d5e0f8057e for update
   71 2026-09-03T15:50:21.973Z fdd7419e-5407-4837-9650-a5f1c7f51e1b  enabled: 
   72 2026-09-03T15:50:29.898Z 713f42f9-49fc-48e3-96e7-33fa933e7d6c  enabled: 
   73 2026-09-03T15:50:41.749Z a531a138-4d68-4e2b-a9d8-96b3fc142257  enabled: updating Crucible zone 6543cbc1-3a3e-4b52-a5bb-df3ea2eb4602 in-place
   74 2026-09-03T15:50:52.998Z 1a7dbf15-6ec3-4c16-a009-51167198dfd2  enabled: updating Crucible zone 8074dad5-a5c3-414c-86ac-2eb4f4aea78f in-place
   75 2026-09-03T15:51:04.660Z 33324f3e-fb90-4567-8982-a015a90f0abe  enabled: updating Crucible zone 81cbb8e4-63ad-45d9-91df-0c60694fb16f in-place
   76 2026-09-03T15:51:21.726Z c93317a7-6e8e-4e47-b1c0-9b18580c3b1b  enabled: updating Crucible zone 9c12f2b9-4c0b-4c7f-b8d6-8122688acb25 in-place
   77 2026-09-03T15:51:34.590Z c3c5aec4-16e9-4cdd-be7f-34f5d810d0d6  enabled: updating Crucible zone a7035e47-7be1-407f-a6ef-91d04748bda8 in-place
   78 2026-09-03T15:51:50.019Z a93b6f58-2717-420b-b43c-00584022a14c  enabled: expunge CruciblePantry zone b075e434-f908-4c3c-b7dd-39051a3c56cf for update
   79 2026-09-03T15:51:50.623Z 772bef96-fb55-4793-bc13-466eb8570a20  enabled: 
   80 2026-09-03T15:51:57.970Z d5aaee86-61c6-4865-8c26-76f09b1dbc03  enabled: 
   81 2026-09-03T15:52:10.138Z 9f44e3d2-c113-4655-a282-f65ca4bcc339  enabled: expunge ExternalDns zone bcf4c91b-66ff-4243-8ca9-ec8d42b3c9dd for update
   82 2026-09-03T15:52:10.882Z dd061783-1bdb-4b3c-b786-7a6c47cd629c  enabled: 
   83 2026-09-03T15:52:21.575Z cfef95b3-7018-415a-a994-9ad7b4891f7e  enabled: updating Crucible zone c3b99825-ad5d-4812-8840-349e202e4b35 in-place
   84 2026-09-03T15:52:33.302Z cb699c29-bfa3-4d0e-83c8-6f38c3d541c1  enabled: expunge InternalDns zone cc77f707-986f-4080-b445-4a753dcf53a1 for update
   85 2026-09-03T15:52:33.745Z 3ee8f07c-3629-4846-a274-f74cf85c5703  enabled: updating Crucible zone ef073fc8-6608-45a4-bd24-a0a0d579053c in-place
   86 2026-09-03T15:53:12.127Z d9b46ae8-4699-4db7-8ac4-6715b5ec5aca  enabled: 
   87 2026-09-03T15:53:30.389Z 61407990-6444-4569-ba9c-37484ef69ae2  enabled: updating Crucible zone fd91fef8-43b2-4399-8922-5bb7b6e2fe53 in-place
   88 2026-09-03T15:53:31.029Z e9c90608-8214-4428-9b94-861bc81313a3  enabled: 
   89 2026-09-03T15:53:53.012Z 1d74e61f-1397-4eb9-b62a-86d7aa73e203  enabled: updated nexus generation from 1 to 2
   90 2026-09-03T15:54:05.955Z cc7de331-9c9d-46aa-91d7-c22cf5d09b57  enabled: expunge Nexus zone 0d165c7e-d23b-4821-8aa8-7f923b81a331 for update
   91 2026-09-03T15:54:07.427Z 00e4d032-a274-4245-b882-2981ccb7a57b  enabled: expunge Nexus zone 296c9cbc-6a55-46ab-a4ea-60c84bb8c667 for update
   92 2026-09-03T15:54:08.187Z 27e1db53-e347-49e4-81f7-68439b38ad1d  enabled: expunge Nexus zone b4ba230a-a4a5-4581-a397-29b6f6d9ff68 for update
   93 2026-09-03T15:54:14.006Z c71ad319-35ab-4cab-96ae-8638341fbb03  enabled: 
   94 2026-09-03T15:54:19.848Z 7295315e-01df-4e7b-950e-126b3b118f35  enabled: 

Disabled operation

Next, I disabled the task and also set nkeep lower:

[berlin]root@oxz_switch1:~# omdb -w nexus reconfigurator-config set --blueprint-pruner-nkeep 75 --blueprint-pruner-enabled false
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
reconfigurator config updated to version 2:
    tuf repo pruner enabled::   true (unchanged)
    planner enabled::::::::::   true (unchanged)
    disruption policy::::::::   terminate (unchanged)
*   blueprint pruner enabled:   true -> false
*   blueprint pruner nkeep:::   85 -> 75

The pruner ran promptly and did nothing because it's disabled:

[berlin]root@oxz_switch1:~# for ip in fd85:375e:4c4d:104::12 fd85:375e:4c4d:102::14 fd85:375e:4c4d:103::16; do echo $ip; omdb nexus background-tasks show --nexus-internal-url http://[$ip]:12232 blueprint_pruner; echo; echo; done
fd85:375e:4c4d:104::12
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 14, triggered by a dependent task completing
    started at 2026-09-03T17:34:19.703Z (3s ago) and ran for 0ms
    status: disabled
    reason: explicitly disabled



fd85:375e:4c4d:102::14
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 14, triggered by a dependent task completing
    started at 2026-09-03T17:34:20.555Z (3s ago) and ran for 0ms
    status: disabled
    reason: explicitly disabled



fd85:375e:4c4d:103::16
note: using Nexus URL http://[fd85:375e:4c4d:103::16]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 14, triggered by a dependent task completing
    started at 2026-09-03T17:34:22.358Z (1s ago) and ran for 0ms
    status: disabled
    reason: explicitly disabled


[berlin]root@oxz_switch1:~# for ip in fd85:375e:4c4d:104::12 fd85:375e:4c4d:102::14 fd85:375e:4c4d:103::16; do echo $ip; omdb nexus background-tasks show --nexus-internal-url http://[$ip]:12232 blueprint_pruner; echo; echo; done
fd85:375e:4c4d:104::12
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 14, triggered by a dependent task completing
    started at 2026-09-03T17:34:19.703Z (24s ago) and ran for 0ms
    status: disabled
    reason: explicitly disabled

I enabled it again:

[berlin]root@oxz_switch1:~# omdb -w nexus reconfigurator-config set --blueprint-pruner-enabled true
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
reconfigurator config updated to version 3:
    tuf repo pruner enabled::   true (unchanged)
    planner enabled::::::::::   true (unchanged)
    disruption policy::::::::   terminate (unchanged)
*   blueprint pruner enabled:   false -> true
    blueprint pruner nkeep:::   75 (unchanged)

and saw it prune another 10 as expected (I caught this before two had noticed the flag change):

[berlin]root@oxz_switch1:~# for ip in fd85:375e:4c4d:104::12 fd85:375e:4c4d:102::14 fd85:375e:4c4d:103::16; do echo $ip; omdb nexus background-tasks show --nexus-internal-url http://[$ip]:12232 blueprint_pruner; echo; echo; done
fd85:375e:4c4d:104::12
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 14, triggered by a dependent task completing
    started at 2026-09-03T17:34:19.703Z (24s ago) and ran for 0ms
    status: disabled
    reason: explicitly disabled



fd85:375e:4c4d:102::14
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 14, triggered by a dependent task completing
    started at 2026-09-03T17:34:20.555Z (24s ago) and ran for 0ms
    status: disabled
    reason: explicitly disabled



fd85:375e:4c4d:103::16
note: using Nexus URL http://[fd85:375e:4c4d:103::16]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 15, triggered by a dependent task completing
    started at 2026-09-03T17:34:42.357Z (2s ago) and ran for 503ms
    status: enabled
    blueprints kept by policy: 75
    bp_target rows that can be deleted: 10
    bp_target rows deleted: 10
    blueprints deleted: 10
        b915e490-aa87-44f2-9df2-93ba08e9a1c8 (made target at 2026-09-03T15:23:48.802Z)
        c07ef817-3e0f-4829-b393-32f9252ece55 (made target at 2026-09-03T15:24:46.471Z)
        f5741410-82da-4129-97a3-d8b8cfcbf516 (made target at 2026-09-03T15:30:59.526Z)
        51729bcc-eaa6-4dec-a012-39b702ce7a35 (made target at 2026-09-03T15:31:24.438Z)
        b37d3112-0878-4ac2-a9c4-9a7461be367a (made target at 2026-09-03T15:37:10.787Z)
        dcce3269-9945-468d-923a-00edfe51444e (made target at 2026-09-03T15:38:39.758Z)
        52773286-f1a6-472f-81d2-6fd302bf4c47 (made target at 2026-09-03T15:39:00.241Z)
        bab5fa26-23e3-4b8f-af1e-f7ce185178af (made target at 2026-09-03T15:39:24.537Z)
        122b10f8-ae04-4503-9ade-3974450bc3ab (made target at 2026-09-03T15:39:37.177Z)
        32918a5d-8001-445f-8c30-a88ca5d1437b (made target at 2026-09-03T15:39:51.973Z)
    errors: 0

We're down another 10:

[berlin]root@oxz_switch1:~# omdb nexus blueprints list | wc -l
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
      76
[berlin]root@oxz_switch1:~# omdb reconfigurator history
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
VERSN TIME                     BLUEPRINT
   20 2026-09-03T15:40:11.773Z 77e0b6a3-7b05-497f-84a9-778e0902cfb2  enabled: expunge InternalDns zone 46f6123e-7674-4416-b8a7-77b3380515a1 for update
   21 2026-09-03T15:40:12.655Z 445873e8-1d80-441a-aebc-e678801d0c5b  enabled: expunge BoundaryNtp zone 475b2f0c-6b9d-4585-a6fd-9275574830b2 for update
   22 2026-09-03T15:40:14.061Z 2fe3ff9c-0ad3-4450-a522-fbc9a3fbc465  enabled: sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: added zone: internal_ntp
   23 2026-09-03T15:40:29.966Z 8d633405-fc94-4250-a1df-59da9c2384b6  enabled:
   24 2026-09-03T15:40:40.529Z 02fccc51-ff2c-4604-a0e3-a6ad6b951365  enabled: updating Crucible zone 77da2fcd-e9b6-4971-8e2a-5b513a7a5cf5 in-place
   25 2026-09-03T15:40:52.841Z f2e1a323-e3d5-432e-9877-88009cf2815e  enabled: updating Crucible zone 7e001040-fabf-47aa-a7e2-c8caf59ee595 in-place
   26 2026-09-03T15:41:11.790Z e93cd5cb-6ee6-40ac-9bb3-239848cdf8e8  enabled: updating Crucible zone 959bbfa1-5909-4a55-8637-7f650c95b8e0 in-place
   27 2026-09-03T15:41:22.465Z b780732b-ac22-4160-83a1-c61e05809b40  enabled: updating Crucible zone 96421e21-e2dd-432d-8552-64cd23e21454 in-place
   28 2026-09-03T15:41:34.005Z d3446085-04a5-4ccf-a32b-41614a830d68  enabled: updating Crucible zone a39fb8c5-7b6e-4ff6-92a1-734ef1725d26 in-place
   29 2026-09-03T15:41:50.069Z 2271fdfc-8b8c-466e-b2eb-4471a1e928a5  enabled: expunge CruciblePantry zone bc2f6146-98a0-40ff-8c27-48507e9eabb4 for update
   30 2026-09-03T15:41:50.563Z 867db5c7-f806-4292-b679-39a1b2554bda  enabled:
   31 2026-09-03T15:41:53.947Z d3424a37-0e66-4e0a-96bc-569261d9e54a  enabled:
   32 2026-09-03T15:42:04.716Z 1656f177-b182-4679-8190-8105ecc05f2e  enabled: expunge ExternalDns zone fd9956d3-00cb-4f93-8d05-1b51fd0ced44 for update
   33 2026-09-03T15:42:05.663Z 5641feef-a510-41bf-a0f8-88220f1c0104  enabled:
   34 2026-09-03T15:42:11.041Z 678b4b86-7cf3-4cc7-a630-b09fba6b2e0e  enabled:
   35 2026-09-03T15:42:19.976Z b1159174-9198-4e27-a11b-a09aca1dc583  enabled: updating Crucible zone 0721b0e2-29e2-4a27-94d8-81faae38e37c in-place
   36 2026-09-03T15:42:32.846Z af0ba60b-aa1f-425b-b665-9916168a9c61  enabled: updating Crucible zone 0e0bb1fb-885c-4966-b726-ba081111558b in-place
   37 2026-09-03T15:42:51.549Z 271629b3-dac6-44f4-be45-7fe2b0a6a758  enabled: updating Crucible zone 154df9c8-9df3-4858-b2b9-9aecd2c677ec in-place
   38 2026-09-03T15:43:07.182Z f074bfd1-7b53-469c-ba35-a793cefa536c  enabled: expunge BoundaryNtp zone 25f7b637-8031-4329-bb0b-3ff43d30335d for update
   39 2026-09-03T15:43:07.766Z f774e558-986f-4e5e-bbdf-93cb62015289  enabled: sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: added zone: internal_ntp
   40 2026-09-03T15:43:27.012Z 541c1960-7ffd-4597-8fc8-7b3af7c994cc  enabled: updating Crucible zone 31a762f9-27e2-4a86-9033-949db723e754 in-place
   41 2026-09-03T15:43:39.358Z 7ada0af6-2e6e-4f89-8e2c-4d475b58c9bc  enabled: expunge ExternalDns zone 3769da2b-b221-4479-8110-9fa82ee1b342 for update
   42 2026-09-03T15:43:39.874Z 9d1a47ee-78ce-4a78-91f1-f7a12a12c3bc  enabled:
   43 2026-09-03T15:43:50.852Z 79516b41-9d99-44cc-a923-9ed89ceb1356  enabled:
   44 2026-09-03T15:43:56.509Z a9ac4515-97a1-4f23-b77e-e2603baca216  enabled: updating CockroachDb zone 38c79cfe-9bee-4e26-a6e0-fa74c1a70490 in-place
   45 2026-09-03T15:44:21.068Z 56db9633-1d45-4558-9d82-73c3c9fda0e8  enabled: updating Crucible zone 472357a3-f8e1-4d67-a82c-ee594e92c87c in-place
   46 2026-09-03T15:44:41.713Z 6238d951-8218-48b3-8644-03ad4f9b6876  enabled: updating Crucible zone 5b512bde-ae30-4080-9adb-a3c9fd67d1ce in-place
   47 2026-09-03T15:44:57.118Z 0716ee1b-f87e-4892-8710-6a6dce029117  enabled: updating Crucible zone 9b3c0364-54a5-452b-8b3e-31a87ea1e4ca in-place
   48 2026-09-03T15:45:09.435Z 565d9653-0271-4a33-897e-316897e9e262  enabled: updating Crucible zone a604c919-dd05-407e-b50c-e72bac695ca0 in-place
   49 2026-09-03T15:45:21.644Z 0737799c-6574-4e42-b53a-03f336920d52  enabled: updating Crucible zone c5eba184-bb59-4f83-8fdb-2b6526bfe2fc in-place
   50 2026-09-03T15:45:33.185Z 03c21f59-19e1-43ff-8e7d-eb203310d666  enabled: expunge InternalDns zone efe9c5df-98f0-4a52-af1c-0dd3c1018709 for update
   51 2026-09-03T15:45:34.096Z cfa107df-7933-4cc2-90d7-768f45241768  enabled: expunge CruciblePantry zone f4c335c7-eeb6-4f3c-9646-d8f866d7581f for update
   52 2026-09-03T15:45:34.866Z cf28cd1e-1488-412c-bb42-8bd6fec81089  enabled:
   53 2026-09-03T15:45:39.844Z b49c6490-0998-4b01-be60-e8f899275445  enabled:
   54 2026-09-03T15:45:57.350Z 818046e1-0804-48dc-8037-5688b05b2184  enabled:
   55 2026-09-03T15:46:07.329Z cc1549b3-368f-4b65-9baf-ab3c8868e3ec  enabled: updating Crucible zone 0414368f-cfdd-45de-b1c2-e4e29063f502 in-place
   56 2026-09-03T15:46:21.528Z 4d39ac4c-7cd0-4965-8372-dae2c7734ac4  enabled: updating Crucible zone 0a07b667-93c0-4b10-9d4c-fc53c8a51004 in-place
   57 2026-09-03T15:46:33.079Z 9c5105e7-3029-4281-b958-f864d81f50ff  enabled: updating Crucible zone 102195d0-3339-4bd2-a74b-5ca6ed606007 in-place
   58 2026-09-03T15:46:50.376Z 80b78ae0-2287-46d6-9a88-97586770b4eb  enabled: updating Crucible zone 2fae068d-3c35-4eae-9a67-c381d4084296 in-place
   59 2026-09-03T15:47:07.232Z 220ecfd5-f692-46f4-b932-bc3732030df4  enabled: updating Clickhouse zone 3b503f54-0a3c-452f-b5b9-c61ab3c59386 in-place
   60 2026-09-03T15:47:40.496Z 22ad2e64-7152-437d-9b48-4b5de2c14339  enabled: updating Crucible zone 4f89610d-3540-4079-9235-ec3e9b544b56 in-place
   61 2026-09-03T15:47:52.654Z 35d7b49b-8019-4460-be7e-7f4b84e9d3f8  enabled: updating Crucible zone 55b66ad2-df84-4095-96fb-b8a52590cabc in-place
   62 2026-09-03T15:48:11.350Z b7cfe232-ed84-40ce-8700-3f89a6cfef19  enabled: updating CockroachDb zone 5c171a6d-808a-4fa1-8e55-6531bf6a8dcf in-place
   63 2026-09-03T15:48:24.145Z d5a0d5ad-0d97-4c29-acdf-7a2dcfa79016  enabled: updating Crucible zone 649f9d77-99e7-4ab5-a5e8-ab6c09fb12bf in-place
   64 2026-09-03T15:48:37.510Z 475ff728-76f0-4417-853d-295b554e9c41  enabled: updating Crucible zone b52531fc-9f6e-4dce-9591-f94979a98b83 in-place
   65 2026-09-03T15:48:50.197Z 3de9b931-f46d-46a4-92a1-04c67713c5a6  enabled: updating CockroachDb zone 9995d066-2863-4dc4-815a-b82c5f77bcbb in-place
   66 2026-09-03T15:49:10.892Z bc6ff54b-813b-4225-861b-bf2ffc290016  enabled: updating Crucible zone dfa395f6-2ad5-419f-9bc6-a2af09015999 in-place
   67 2026-09-03T15:49:22.664Z 9505bbae-ab89-46e5-b47a-bc9f9622589c  enabled: updating Crucible zone 0c7ef14e-0abf-4f28-98cb-1dace3736d3f in-place
   68 2026-09-03T15:49:34.305Z 1c9635af-eaa7-44c9-900e-0a20ae5e68d4  enabled: updating CockroachDb zone 309f9bf0-ed2c-4a24-a09c-f22b89bd3ebd in-place
   69 2026-09-03T15:50:08.292Z 09ce326d-be80-407c-b8f8-58324d2e0225  enabled: updating Crucible zone 512345a6-96a0-4de2-8667-6bd7ae5b3f37 in-place
   70 2026-09-03T15:50:21.542Z e2e02086-ebd3-4189-8dc3-9611bc3d06bc  enabled: expunge Oximeter zone 57802fdd-32e6-4f40-9b9e-38d5e0f8057e for update
   71 2026-09-03T15:50:21.973Z fdd7419e-5407-4837-9650-a5f1c7f51e1b  enabled:
   72 2026-09-03T15:50:29.898Z 713f42f9-49fc-48e3-96e7-33fa933e7d6c  enabled:
   73 2026-09-03T15:50:41.749Z a531a138-4d68-4e2b-a9d8-96b3fc142257  enabled: updating Crucible zone 6543cbc1-3a3e-4b52-a5bb-df3ea2eb4602 in-place
   74 2026-09-03T15:50:52.998Z 1a7dbf15-6ec3-4c16-a009-51167198dfd2  enabled: updating Crucible zone 8074dad5-a5c3-414c-86ac-2eb4f4aea78f in-place
   75 2026-09-03T15:51:04.660Z 33324f3e-fb90-4567-8982-a015a90f0abe  enabled: updating Crucible zone 81cbb8e4-63ad-45d9-91df-0c60694fb16f in-place
   76 2026-09-03T15:51:21.726Z c93317a7-6e8e-4e47-b1c0-9b18580c3b1b  enabled: updating Crucible zone 9c12f2b9-4c0b-4c7f-b8d6-8122688acb25 in-place
   77 2026-09-03T15:51:34.590Z c3c5aec4-16e9-4cdd-be7f-34f5d810d0d6  enabled: updating Crucible zone a7035e47-7be1-407f-a6ef-91d04748bda8 in-place
   78 2026-09-03T15:51:50.019Z a93b6f58-2717-420b-b43c-00584022a14c  enabled: expunge CruciblePantry zone b075e434-f908-4c3c-b7dd-39051a3c56cf for update
   79 2026-09-03T15:51:50.623Z 772bef96-fb55-4793-bc13-466eb8570a20  enabled:
   80 2026-09-03T15:51:57.970Z d5aaee86-61c6-4865-8c26-76f09b1dbc03  enabled:
   81 2026-09-03T15:52:10.138Z 9f44e3d2-c113-4655-a282-f65ca4bcc339  enabled: expunge ExternalDns zone bcf4c91b-66ff-4243-8ca9-ec8d42b3c9dd for update
   82 2026-09-03T15:52:10.882Z dd061783-1bdb-4b3c-b786-7a6c47cd629c  enabled:
   83 2026-09-03T15:52:21.575Z cfef95b3-7018-415a-a994-9ad7b4891f7e  enabled: updating Crucible zone c3b99825-ad5d-4812-8840-349e202e4b35 in-place
   84 2026-09-03T15:52:33.302Z cb699c29-bfa3-4d0e-83c8-6f38c3d541c1  enabled: expunge InternalDns zone cc77f707-986f-4080-b445-4a753dcf53a1 for update
   85 2026-09-03T15:52:33.745Z 3ee8f07c-3629-4846-a274-f74cf85c5703  enabled: updating Crucible zone ef073fc8-6608-45a4-bd24-a0a0d579053c in-place
   86 2026-09-03T15:53:12.127Z d9b46ae8-4699-4db7-8ac4-6715b5ec5aca  enabled:
   87 2026-09-03T15:53:30.389Z 61407990-6444-4569-ba9c-37484ef69ae2  enabled: updating Crucible zone fd91fef8-43b2-4399-8922-5bb7b6e2fe53 in-place
   88 2026-09-03T15:53:31.029Z e9c90608-8214-4428-9b94-861bc81313a3  enabled:
   89 2026-09-03T15:53:53.012Z 1d74e61f-1397-4eb9-b62a-86d7aa73e203  enabled: updated nexus generation from 1 to 2
   90 2026-09-03T15:54:05.955Z cc7de331-9c9d-46aa-91d7-c22cf5d09b57  enabled: expunge Nexus zone 0d165c7e-d23b-4821-8aa8-7f923b81a331 for update
   91 2026-09-03T15:54:07.427Z 00e4d032-a274-4245-b882-2981ccb7a57b  enabled: expunge Nexus zone 296c9cbc-6a55-46ab-a4ea-60c84bb8c667 for update
   92 2026-09-03T15:54:08.187Z 27e1db53-e347-49e4-81f7-68439b38ad1d  enabled: expunge Nexus zone b4ba230a-a4a5-4581-a397-29b6f6d9ff68 for update
   93 2026-09-03T15:54:14.006Z c71ad319-35ab-4cab-96ae-8638341fbb03  enabled:
   94 2026-09-03T15:54:19.848Z 7295315e-01df-4e7b-950e-126b3b118f35  enabled:

Interaction with archive

Next I wanted to verify what happens in practice with omdb reconfigurator archive. This is a little strange because it removes N most recent blueprints that it can but does not remove bp_target rows, so it sort of punches a hole in the history. I had it remove 22 (somewhat arbitrary, but I wanted there to be a bunch of deleted ones but also a bunch of non-deleted ones earlier in the history):

[berlin]root@oxz_switch1:~# omdb -w reconfigurator archive --nmax-blueprints 22 archived.out
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
assembling reconfigurator state ... done
warning: reached limit of 22 while fetching blueprints
warning: saving only the most recent 22
saving to archived.out ... done
removing saved, non-target blueprints ...
  successfully deleted blueprint 00e4d032-a274-4245-b882-2981ccb7a57b
  successfully deleted blueprint 1a7dbf15-6ec3-4c16-a009-51167198dfd2
  successfully deleted blueprint 1d74e61f-1397-4eb9-b62a-86d7aa73e203
  successfully deleted blueprint 27e1db53-e347-49e4-81f7-68439b38ad1d
  successfully deleted blueprint 33324f3e-fb90-4567-8982-a015a90f0abe
  successfully deleted blueprint 3ee8f07c-3629-4846-a274-f74cf85c5703
  successfully deleted blueprint 61407990-6444-4569-ba9c-37484ef69ae2
  successfully deleted blueprint 772bef96-fb55-4793-bc13-466eb8570a20
  successfully deleted blueprint 9f44e3d2-c113-4655-a282-f65ca4bcc339
  successfully deleted blueprint a531a138-4d68-4e2b-a9d8-96b3fc142257
  successfully deleted blueprint a93b6f58-2717-420b-b43c-00584022a14c
  successfully deleted blueprint c3c5aec4-16e9-4cdd-be7f-34f5d810d0d6
  successfully deleted blueprint c71ad319-35ab-4cab-96ae-8638341fbb03
  successfully deleted blueprint c93317a7-6e8e-4e47-b1c0-9b18580c3b1b
  successfully deleted blueprint cb699c29-bfa3-4d0e-83c8-6f38c3d541c1
  successfully deleted blueprint cc7de331-9c9d-46aa-91d7-c22cf5d09b57
  successfully deleted blueprint cfef95b3-7018-415a-a994-9ad7b4891f7e
  successfully deleted blueprint d5aaee86-61c6-4865-8c26-76f09b1dbc03
  successfully deleted blueprint d9b46ae8-4699-4db7-8ac4-6715b5ec5aca
  successfully deleted blueprint dd061783-1bdb-4b3c-b786-7a6c47cd629c
  successfully deleted blueprint e9c90608-8214-4428-9b94-861bc81313a3
done (21 blueprints deleted)
warning: Only tried deleting the most recent 22 blueprints
warning: because that's all that was fetched and saved.
warning: You may want to run this tool again to archive more.

You can see this doesn't remove rows from omdb reconfigurator history but it doesn't know anything about a bunch of blueprints because they've been deleted:

[berlin]root@oxz_switch1:~# omdb reconfigurator history
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
VERSN TIME                     BLUEPRINT
   20 2026-09-03T15:40:11.773Z 77e0b6a3-7b05-497f-84a9-778e0902cfb2  enabled: expunge InternalDns zone 46f6123e-7674-4416-b8a7-77b3380515a1 for update
   21 2026-09-03T15:40:12.655Z 445873e8-1d80-441a-aebc-e678801d0c5b  enabled: expunge BoundaryNtp zone 475b2f0c-6b9d-4585-a6fd-9275574830b2 for update
   22 2026-09-03T15:40:14.061Z 2fe3ff9c-0ad3-4450-a522-fbc9a3fbc465  enabled: sled 82ec17d9-936c-459b-ad47-0ba87bb053bb: added zone: internal_ntp
   23 2026-09-03T15:40:29.966Z 8d633405-fc94-4250-a1df-59da9c2384b6  enabled:
   24 2026-09-03T15:40:40.529Z 02fccc51-ff2c-4604-a0e3-a6ad6b951365  enabled: updating Crucible zone 77da2fcd-e9b6-4971-8e2a-5b513a7a5cf5 in-place
   25 2026-09-03T15:40:52.841Z f2e1a323-e3d5-432e-9877-88009cf2815e  enabled: updating Crucible zone 7e001040-fabf-47aa-a7e2-c8caf59ee595 in-place
   26 2026-09-03T15:41:11.790Z e93cd5cb-6ee6-40ac-9bb3-239848cdf8e8  enabled: updating Crucible zone 959bbfa1-5909-4a55-8637-7f650c95b8e0 in-place
   27 2026-09-03T15:41:22.465Z b780732b-ac22-4160-83a1-c61e05809b40  enabled: updating Crucible zone 96421e21-e2dd-432d-8552-64cd23e21454 in-place
   28 2026-09-03T15:41:34.005Z d3446085-04a5-4ccf-a32b-41614a830d68  enabled: updating Crucible zone a39fb8c5-7b6e-4ff6-92a1-734ef1725d26 in-place
   29 2026-09-03T15:41:50.069Z 2271fdfc-8b8c-466e-b2eb-4471a1e928a5  enabled: expunge CruciblePantry zone bc2f6146-98a0-40ff-8c27-48507e9eabb4 for update
   30 2026-09-03T15:41:50.563Z 867db5c7-f806-4292-b679-39a1b2554bda  enabled:
   31 2026-09-03T15:41:53.947Z d3424a37-0e66-4e0a-96bc-569261d9e54a  enabled:
   32 2026-09-03T15:42:04.716Z 1656f177-b182-4679-8190-8105ecc05f2e  enabled: expunge ExternalDns zone fd9956d3-00cb-4f93-8d05-1b51fd0ced44 for update
   33 2026-09-03T15:42:05.663Z 5641feef-a510-41bf-a0f8-88220f1c0104  enabled:
   34 2026-09-03T15:42:11.041Z 678b4b86-7cf3-4cc7-a630-b09fba6b2e0e  enabled:
   35 2026-09-03T15:42:19.976Z b1159174-9198-4e27-a11b-a09aca1dc583  enabled: updating Crucible zone 0721b0e2-29e2-4a27-94d8-81faae38e37c in-place
   36 2026-09-03T15:42:32.846Z af0ba60b-aa1f-425b-b665-9916168a9c61  enabled: updating Crucible zone 0e0bb1fb-885c-4966-b726-ba081111558b in-place
   37 2026-09-03T15:42:51.549Z 271629b3-dac6-44f4-be45-7fe2b0a6a758  enabled: updating Crucible zone 154df9c8-9df3-4858-b2b9-9aecd2c677ec in-place
   38 2026-09-03T15:43:07.182Z f074bfd1-7b53-469c-ba35-a793cefa536c  enabled: expunge BoundaryNtp zone 25f7b637-8031-4329-bb0b-3ff43d30335d for update
   39 2026-09-03T15:43:07.766Z f774e558-986f-4e5e-bbdf-93cb62015289  enabled: sled c8f6e40f-c626-49df-a38b-cc13de2d9f33: added zone: internal_ntp
   40 2026-09-03T15:43:27.012Z 541c1960-7ffd-4597-8fc8-7b3af7c994cc  enabled: updating Crucible zone 31a762f9-27e2-4a86-9033-949db723e754 in-place
   41 2026-09-03T15:43:39.358Z 7ada0af6-2e6e-4f89-8e2c-4d475b58c9bc  enabled: expunge ExternalDns zone 3769da2b-b221-4479-8110-9fa82ee1b342 for update
   42 2026-09-03T15:43:39.874Z 9d1a47ee-78ce-4a78-91f1-f7a12a12c3bc  enabled:
   43 2026-09-03T15:43:50.852Z 79516b41-9d99-44cc-a923-9ed89ceb1356  enabled:
   44 2026-09-03T15:43:56.509Z a9ac4515-97a1-4f23-b77e-e2603baca216  enabled: updating CockroachDb zone 38c79cfe-9bee-4e26-a6e0-fa74c1a70490 in-place
   45 2026-09-03T15:44:21.068Z 56db9633-1d45-4558-9d82-73c3c9fda0e8  enabled: updating Crucible zone 472357a3-f8e1-4d67-a82c-ee594e92c87c in-place
   46 2026-09-03T15:44:41.713Z 6238d951-8218-48b3-8644-03ad4f9b6876  enabled: updating Crucible zone 5b512bde-ae30-4080-9adb-a3c9fd67d1ce in-place
   47 2026-09-03T15:44:57.118Z 0716ee1b-f87e-4892-8710-6a6dce029117  enabled: updating Crucible zone 9b3c0364-54a5-452b-8b3e-31a87ea1e4ca in-place
   48 2026-09-03T15:45:09.435Z 565d9653-0271-4a33-897e-316897e9e262  enabled: updating Crucible zone a604c919-dd05-407e-b50c-e72bac695ca0 in-place
   49 2026-09-03T15:45:21.644Z 0737799c-6574-4e42-b53a-03f336920d52  enabled: updating Crucible zone c5eba184-bb59-4f83-8fdb-2b6526bfe2fc in-place
   50 2026-09-03T15:45:33.185Z 03c21f59-19e1-43ff-8e7d-eb203310d666  enabled: expunge InternalDns zone efe9c5df-98f0-4a52-af1c-0dd3c1018709 for update
   51 2026-09-03T15:45:34.096Z cfa107df-7933-4cc2-90d7-768f45241768  enabled: expunge CruciblePantry zone f4c335c7-eeb6-4f3c-9646-d8f866d7581f for update
   52 2026-09-03T15:45:34.866Z cf28cd1e-1488-412c-bb42-8bd6fec81089  enabled:
   53 2026-09-03T15:45:39.844Z b49c6490-0998-4b01-be60-e8f899275445  enabled:
   54 2026-09-03T15:45:57.350Z 818046e1-0804-48dc-8037-5688b05b2184  enabled:
   55 2026-09-03T15:46:07.329Z cc1549b3-368f-4b65-9baf-ab3c8868e3ec  enabled: updating Crucible zone 0414368f-cfdd-45de-b1c2-e4e29063f502 in-place
   56 2026-09-03T15:46:21.528Z 4d39ac4c-7cd0-4965-8372-dae2c7734ac4  enabled: updating Crucible zone 0a07b667-93c0-4b10-9d4c-fc53c8a51004 in-place
   57 2026-09-03T15:46:33.079Z 9c5105e7-3029-4281-b958-f864d81f50ff  enabled: updating Crucible zone 102195d0-3339-4bd2-a74b-5ca6ed606007 in-place
   58 2026-09-03T15:46:50.376Z 80b78ae0-2287-46d6-9a88-97586770b4eb  enabled: updating Crucible zone 2fae068d-3c35-4eae-9a67-c381d4084296 in-place
   59 2026-09-03T15:47:07.232Z 220ecfd5-f692-46f4-b932-bc3732030df4  enabled: updating Clickhouse zone 3b503f54-0a3c-452f-b5b9-c61ab3c59386 in-place
   60 2026-09-03T15:47:40.496Z 22ad2e64-7152-437d-9b48-4b5de2c14339  enabled: updating Crucible zone 4f89610d-3540-4079-9235-ec3e9b544b56 in-place
   61 2026-09-03T15:47:52.654Z 35d7b49b-8019-4460-be7e-7f4b84e9d3f8  enabled: updating Crucible zone 55b66ad2-df84-4095-96fb-b8a52590cabc in-place
   62 2026-09-03T15:48:11.350Z b7cfe232-ed84-40ce-8700-3f89a6cfef19  enabled: updating CockroachDb zone 5c171a6d-808a-4fa1-8e55-6531bf6a8dcf in-place
   63 2026-09-03T15:48:24.145Z d5a0d5ad-0d97-4c29-acdf-7a2dcfa79016  enabled: updating Crucible zone 649f9d77-99e7-4ab5-a5e8-ab6c09fb12bf in-place
   64 2026-09-03T15:48:37.510Z 475ff728-76f0-4417-853d-295b554e9c41  enabled: updating Crucible zone b52531fc-9f6e-4dce-9591-f94979a98b83 in-place
   65 2026-09-03T15:48:50.197Z 3de9b931-f46d-46a4-92a1-04c67713c5a6  enabled: updating CockroachDb zone 9995d066-2863-4dc4-815a-b82c5f77bcbb in-place
   66 2026-09-03T15:49:10.892Z bc6ff54b-813b-4225-861b-bf2ffc290016  enabled: updating Crucible zone dfa395f6-2ad5-419f-9bc6-a2af09015999 in-place
   67 2026-09-03T15:49:22.664Z 9505bbae-ab89-46e5-b47a-bc9f9622589c  enabled: updating Crucible zone 0c7ef14e-0abf-4f28-98cb-1dace3736d3f in-place
   68 2026-09-03T15:49:34.305Z 1c9635af-eaa7-44c9-900e-0a20ae5e68d4  enabled: updating CockroachDb zone 309f9bf0-ed2c-4a24-a09c-f22b89bd3ebd in-place
   69 2026-09-03T15:50:08.292Z 09ce326d-be80-407c-b8f8-58324d2e0225  enabled: updating Crucible zone 512345a6-96a0-4de2-8667-6bd7ae5b3f37 in-place
   70 2026-09-03T15:50:21.542Z e2e02086-ebd3-4189-8dc3-9611bc3d06bc  enabled: expunge Oximeter zone 57802fdd-32e6-4f40-9b9e-38d5e0f8057e for update
   71 2026-09-03T15:50:21.973Z fdd7419e-5407-4837-9650-a5f1c7f51e1b  enabled:
   72 2026-09-03T15:50:29.898Z 713f42f9-49fc-48e3-96e7-33fa933e7d6c  enabled:
   73 2026-09-03T15:50:41.749Z a531a138-4d68-4e2b-a9d8-96b3fc142257  enabled: blueprint details no longer available
   74 2026-09-03T15:50:52.998Z 1a7dbf15-6ec3-4c16-a009-51167198dfd2  enabled: blueprint details no longer available
   75 2026-09-03T15:51:04.660Z 33324f3e-fb90-4567-8982-a015a90f0abe  enabled: blueprint details no longer available
   76 2026-09-03T15:51:21.726Z c93317a7-6e8e-4e47-b1c0-9b18580c3b1b  enabled: blueprint details no longer available
   77 2026-09-03T15:51:34.590Z c3c5aec4-16e9-4cdd-be7f-34f5d810d0d6  enabled: blueprint details no longer available
   78 2026-09-03T15:51:50.019Z a93b6f58-2717-420b-b43c-00584022a14c  enabled: blueprint details no longer available
   79 2026-09-03T15:51:50.623Z 772bef96-fb55-4793-bc13-466eb8570a20  enabled: blueprint details no longer available
   80 2026-09-03T15:51:57.970Z d5aaee86-61c6-4865-8c26-76f09b1dbc03  enabled: blueprint details no longer available
   81 2026-09-03T15:52:10.138Z 9f44e3d2-c113-4655-a282-f65ca4bcc339  enabled: blueprint details no longer available
   82 2026-09-03T15:52:10.882Z dd061783-1bdb-4b3c-b786-7a6c47cd629c  enabled: blueprint details no longer available
   83 2026-09-03T15:52:21.575Z cfef95b3-7018-415a-a994-9ad7b4891f7e  enabled: blueprint details no longer available
   84 2026-09-03T15:52:33.302Z cb699c29-bfa3-4d0e-83c8-6f38c3d541c1  enabled: blueprint details no longer available
   85 2026-09-03T15:52:33.745Z 3ee8f07c-3629-4846-a274-f74cf85c5703  enabled: blueprint details no longer available
   86 2026-09-03T15:53:12.127Z d9b46ae8-4699-4db7-8ac4-6715b5ec5aca  enabled: blueprint details no longer available
   87 2026-09-03T15:53:30.389Z 61407990-6444-4569-ba9c-37484ef69ae2  enabled: blueprint details no longer available
   88 2026-09-03T15:53:31.029Z e9c90608-8214-4428-9b94-861bc81313a3  enabled: blueprint details no longer available
   89 2026-09-03T15:53:53.012Z 1d74e61f-1397-4eb9-b62a-86d7aa73e203  enabled: blueprint details no longer available
   90 2026-09-03T15:54:05.955Z cc7de331-9c9d-46aa-91d7-c22cf5d09b57  enabled: blueprint details no longer available
   91 2026-09-03T15:54:07.427Z 00e4d032-a274-4245-b882-2981ccb7a57b  enabled: blueprint details no longer available
   92 2026-09-03T15:54:08.187Z 27e1db53-e347-49e4-81f7-68439b38ad1d  enabled: blueprint details no longer available
   93 2026-09-03T15:54:14.006Z c71ad319-35ab-4cab-96ae-8638341fbb03  enabled: blueprint details no longer available
   94 2026-09-03T15:54:19.848Z 7295315e-01df-4e7b-950e-126b3b118f35  enabled:

and the blueprints are gone:

[berlin]root@oxz_switch1:~# omdb nexus blueprints list | wc -l
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
      55

Next I set nkeep = 10. We should expect that we'll wind up pruning all bp_target rows except the last 10, which means removing all blueprints except for the last 10, but the oldest 9 of those were already removed. So we'll be left with only the current target blueprint.

[berlin]root@oxz_switch1:~# omdb -w nexus reconfigurator-config set --blueprint-pruner-nkeep 10 --blueprint-pruner-enabled true
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
reconfigurator config updated to version 4:
    tuf repo pruner enabled::   true (unchanged)
    planner enabled::::::::::   true (unchanged)
    disruption policy::::::::   terminate (unchanged)
    blueprint pruner enabled:   true (unchanged)
*   blueprint pruner nkeep:::   75 -> 10
[berlin]root@oxz_switch1:~# for ip in fd85:375e:4c4d:104::12 fd85:375e:4c4d:102::14 fd85:375e:4c4d:103::16; do echo $ip; omdb nexus background-tasks show --nexus-internal-url http://[$ip]:12232 blueprint_pruner; echo; echo; done
fd85:375e:4c4d:104::12
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 16, triggered by a dependent task completing
    started at 2026-09-03T17:37:34.718Z (13s ago) and ran for 2360ms
    status: enabled
    blueprints kept by policy: 10
    bp_target rows that can be deleted: 50
    bp_target rows deleted: 50
    blueprints deleted: 45
        77e0b6a3-7b05-497f-84a9-778e0902cfb2 (made target at 2026-09-03T15:40:11.773Z)
        445873e8-1d80-441a-aebc-e678801d0c5b (made target at 2026-09-03T15:40:12.655Z)
        2fe3ff9c-0ad3-4450-a522-fbc9a3fbc465 (made target at 2026-09-03T15:40:14.061Z)
        8d633405-fc94-4250-a1df-59da9c2384b6 (made target at 2026-09-03T15:40:29.966Z)
        02fccc51-ff2c-4604-a0e3-a6ad6b951365 (made target at 2026-09-03T15:40:40.529Z)
        f2e1a323-e3d5-432e-9877-88009cf2815e (made target at 2026-09-03T15:40:52.841Z)
        e93cd5cb-6ee6-40ac-9bb3-239848cdf8e8 (made target at 2026-09-03T15:41:11.790Z)
        b780732b-ac22-4160-83a1-c61e05809b40 (made target at 2026-09-03T15:41:22.465Z)
        d3446085-04a5-4ccf-a32b-41614a830d68 (made target at 2026-09-03T15:41:34.005Z)
        2271fdfc-8b8c-466e-b2eb-4471a1e928a5 (made target at 2026-09-03T15:41:50.069Z)
        867db5c7-f806-4292-b679-39a1b2554bda (made target at 2026-09-03T15:41:50.563Z)
        d3424a37-0e66-4e0a-96bc-569261d9e54a (made target at 2026-09-03T15:41:53.947Z)
        1656f177-b182-4679-8190-8105ecc05f2e (made target at 2026-09-03T15:42:04.716Z)
        5641feef-a510-41bf-a0f8-88220f1c0104 (made target at 2026-09-03T15:42:05.663Z)
        678b4b86-7cf3-4cc7-a630-b09fba6b2e0e (made target at 2026-09-03T15:42:11.041Z)
        b1159174-9198-4e27-a11b-a09aca1dc583 (made target at 2026-09-03T15:42:19.976Z)
        af0ba60b-aa1f-425b-b665-9916168a9c61 (made target at 2026-09-03T15:42:32.846Z)
        271629b3-dac6-44f4-be45-7fe2b0a6a758 (made target at 2026-09-03T15:42:51.549Z)
        f074bfd1-7b53-469c-ba35-a793cefa536c (made target at 2026-09-03T15:43:07.182Z)
        a9ac4515-97a1-4f23-b77e-e2603baca216 (made target at 2026-09-03T15:43:56.509Z)
        56db9633-1d45-4558-9d82-73c3c9fda0e8 (made target at 2026-09-03T15:44:21.068Z)
        6238d951-8218-48b3-8644-03ad4f9b6876 (made target at 2026-09-03T15:44:41.713Z)
        0716ee1b-f87e-4892-8710-6a6dce029117 (made target at 2026-09-03T15:44:57.118Z)
        565d9653-0271-4a33-897e-316897e9e262 (made target at 2026-09-03T15:45:09.435Z)
        0737799c-6574-4e42-b53a-03f336920d52 (made target at 2026-09-03T15:45:21.644Z)
        03c21f59-19e1-43ff-8e7d-eb203310d666 (made target at 2026-09-03T15:45:33.185Z)
        cfa107df-7933-4cc2-90d7-768f45241768 (made target at 2026-09-03T15:45:34.096Z)
        cf28cd1e-1488-412c-bb42-8bd6fec81089 (made target at 2026-09-03T15:45:34.866Z)
        b49c6490-0998-4b01-be60-e8f899275445 (made target at 2026-09-03T15:45:39.844Z)
        818046e1-0804-48dc-8037-5688b05b2184 (made target at 2026-09-03T15:45:57.350Z)
        cc1549b3-368f-4b65-9baf-ab3c8868e3ec (made target at 2026-09-03T15:46:07.329Z)
        4d39ac4c-7cd0-4965-8372-dae2c7734ac4 (made target at 2026-09-03T15:46:21.528Z)
        9c5105e7-3029-4281-b958-f864d81f50ff (made target at 2026-09-03T15:46:33.079Z)
        80b78ae0-2287-46d6-9a88-97586770b4eb (made target at 2026-09-03T15:46:50.376Z)
        220ecfd5-f692-46f4-b932-bc3732030df4 (made target at 2026-09-03T15:47:07.232Z)
        22ad2e64-7152-437d-9b48-4b5de2c14339 (made target at 2026-09-03T15:47:40.496Z)
        35d7b49b-8019-4460-be7e-7f4b84e9d3f8 (made target at 2026-09-03T15:47:52.654Z)
        b7cfe232-ed84-40ce-8700-3f89a6cfef19 (made target at 2026-09-03T15:48:11.350Z)
        d5a0d5ad-0d97-4c29-acdf-7a2dcfa79016 (made target at 2026-09-03T15:48:24.145Z)
        475ff728-76f0-4417-853d-295b554e9c41 (made target at 2026-09-03T15:48:37.510Z)
        3de9b931-f46d-46a4-92a1-04c67713c5a6 (made target at 2026-09-03T15:48:50.197Z)
        bc6ff54b-813b-4225-861b-bf2ffc290016 (made target at 2026-09-03T15:49:10.892Z)
        9505bbae-ab89-46e5-b47a-bc9f9622589c (made target at 2026-09-03T15:49:22.664Z)
        1c9635af-eaa7-44c9-900e-0a20ae5e68d4 (made target at 2026-09-03T15:49:34.305Z)
        09ce326d-be80-407c-b8f8-58324d2e0225 (made target at 2026-09-03T15:50:08.292Z)
    errors: 0



fd85:375e:4c4d:102::14
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 16, triggered by a dependent task completing
    started at 2026-09-03T17:37:35.462Z (12s ago) and ran for 1616ms
    status: enabled
    blueprints kept by policy: 10
    bp_target rows that can be deleted: 50
    bp_target rows deleted: 0
    blueprints deleted: 5
        f774e558-986f-4e5e-bbdf-93cb62015289 (made target at 2026-09-03T15:43:07.766Z)
        541c1960-7ffd-4597-8fc8-7b3af7c994cc (made target at 2026-09-03T15:43:27.012Z)
        7ada0af6-2e6e-4f89-8e2c-4d475b58c9bc (made target at 2026-09-03T15:43:39.358Z)
        9d1a47ee-78ce-4a78-91f1-f7a12a12c3bc (made target at 2026-09-03T15:43:39.874Z)
        79516b41-9d99-44cc-a923-9ed89ceb1356 (made target at 2026-09-03T15:43:50.852Z)
    errors: 0



fd85:375e:4c4d:103::16
note: using Nexus URL http://[fd85:375e:4c4d:103::16]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 16, triggered by a dependent task completing
    started at 2026-09-03T17:37:37.375Z (11s ago) and ran for 453ms
    status: enabled
    blueprints kept by policy: 10
    bp_target rows that can be deleted: 15
    bp_target rows deleted: 15
    blueprints deleted: 3
        e2e02086-ebd3-4189-8dc3-9611bc3d06bc (made target at 2026-09-03T15:50:21.542Z)
        fdd7419e-5407-4837-9650-a5f1c7f51e1b (made target at 2026-09-03T15:50:21.973Z)
        713f42f9-49fc-48e3-96e7-33fa933e7d6c (made target at 2026-09-03T15:50:29.898Z)
    errors: 0
[berlin]root@oxz_switch1:~# omdb reconfigurator history
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
VERSN TIME                     BLUEPRINT                           
   85 2026-09-03T15:52:33.745Z 3ee8f07c-3629-4846-a274-f74cf85c5703  enabled: blueprint details no longer available
   86 2026-09-03T15:53:12.127Z d9b46ae8-4699-4db7-8ac4-6715b5ec5aca  enabled: blueprint details no longer available
   87 2026-09-03T15:53:30.389Z 61407990-6444-4569-ba9c-37484ef69ae2  enabled: blueprint details no longer available
   88 2026-09-03T15:53:31.029Z e9c90608-8214-4428-9b94-861bc81313a3  enabled: blueprint details no longer available
   89 2026-09-03T15:53:53.012Z 1d74e61f-1397-4eb9-b62a-86d7aa73e203  enabled: blueprint details no longer available
   90 2026-09-03T15:54:05.955Z cc7de331-9c9d-46aa-91d7-c22cf5d09b57  enabled: blueprint details no longer available
   91 2026-09-03T15:54:07.427Z 00e4d032-a274-4245-b882-2981ccb7a57b  enabled: blueprint details no longer available
   92 2026-09-03T15:54:08.187Z 27e1db53-e347-49e4-81f7-68439b38ad1d  enabled: blueprint details no longer available
   93 2026-09-03T15:54:14.006Z c71ad319-35ab-4cab-96ae-8638341fbb03  enabled: blueprint details no longer available
   94 2026-09-03T15:54:19.848Z 7295315e-01df-4e7b-950e-126b3b118f35  enabled: 
[berlin]root@oxz_switch1:~# omdb nexus blueprints list | wc -l
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
       2

We also see from this output that:

  • The first pruner found it could delete 50 rows (which is the max it will do in one pass), deleted 50 bp_target rows, but deleted only 45 blueprints. This is at first surprising: the 50 earliest rows in bp_target correspond to non-deleted blueprints, so it should have been able to delete those. I found that the ones in this range it didn't delete were deleted by the second Nexus's task, which ran concurrently. (The activation timestamps confirm this.)
  • The second pruner found it could delete 50 rows, deleted 5 blueprints, but didn't delete any rows -- presumably because the first pruner had already deleted the rows by that point.
  • The third pruner essentially ran after the other two and found another 15 rows it could delete (which makes sense: we started with 75 and deleted 50, leaving 25, and we're keeping 10). The first three of these had blueprints associated with them, but the rest didn't -- they'd been cleaned up by the archive. So it removed 15 rows, but only 3 blueprints.

Clamping behavior, deleting initial rows with no blueprint

Finally, I set nkeep to 0 and waited for another prune round to verify that we still kept 3 and also that there was no trouble cleaning things up when the initial run of bp_target had its blueprints already deleted.

[berlin]root@oxz_switch1:~# omdb -w nexus reconfigurator-config set --blueprint-pruner-nkeep 0 --blueprint-pruner-enabled true
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
reconfigurator config updated to version 5:
    tuf repo pruner enabled::   true (unchanged)
    planner enabled::::::::::   true (unchanged)
    disruption policy::::::::   terminate (unchanged)
    blueprint pruner enabled:   true (unchanged)
*   blueprint pruner nkeep:::   10 -> 0
[berlin]root@oxz_switch1:~# for ip in fd85:375e:4c4d:104::12 fd85:375e:4c4d:102::14 fd85:375e:4c4d:103::16; do echo $ip; omdb nexus background-tasks show --nexus-internal-url http://[$ip]:12232 blueprint_pruner; echo; echo; done
fd85:375e:4c4d:104::12
note: using Nexus URL http://[fd85:375e:4c4d:104::12]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 17, triggered by a dependent task completing
    started at 2026-09-03T17:40:34.730Z (2s ago) and ran for 297ms
    status: enabled
    blueprints kept by policy: 3
    bp_target rows that can be deleted: 7
    bp_target rows deleted: 7
    blueprints deleted: 0
    errors: 0



fd85:375e:4c4d:102::14
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 17, triggered by a dependent task completing
    started at 2026-09-03T17:40:35.476Z (2s ago) and ran for 17ms
    status: enabled
    blueprints kept by policy: 3
    bp_target rows that can be deleted: 0
    bp_target rows deleted: 0
    blueprints deleted: 0
    errors: 0



fd85:375e:4c4d:103::16
note: using Nexus URL http://[fd85:375e:4c4d:103::16]:12232
task: "blueprint_pruner"
  configured period: every 10m
  currently executing: no
  last completed activation: iter 17, triggered by a dependent task completing
    started at 2026-09-03T17:40:37.380Z (0s ago) and ran for 58ms
    status: enabled
    blueprints kept by policy: 3
    bp_target rows that can be deleted: 0
    bp_target rows deleted: 0
    blueprints deleted: 0
    errors: 0

Sure enough, the first task pruned 7 rows, deleting 0 blueprints.

Final state:

[berlin]root@oxz_switch1:~# omdb reconfigurator history
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd85:375e:4c4d:101::3]:32221,[fd85:375e:4c4d:103::3]:32221,[fd85:375e:4c4d:102::3]:32221,[fd85:375e:4c4d:104::4]:32221,[fd85:375e:4c4d:104::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (299.0.0)
VERSN TIME                     BLUEPRINT                           
   92 2026-09-03T15:54:08.187Z 27e1db53-e347-49e4-81f7-68439b38ad1d  enabled: blueprint details no longer available
   93 2026-09-03T15:54:14.006Z c71ad319-35ab-4cab-96ae-8638341fbb03  enabled: blueprint details no longer available
   94 2026-09-03T15:54:19.848Z 7295315e-01df-4e7b-950e-126b3b118f35  enabled: 
[berlin]root@oxz_switch1:~# omdb nexus blueprints list | wc -l
note: Nexus URL not specified.  Will pick one from DNS.
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using Nexus URL http://[fd85:375e:4c4d:102::14]:12232
       2

Smoke check db state

Making sure it's all really gone:

[berlin]root@oxz_switch1:~# omdb db sql -w
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
#
# Welcome to the CockroachDB SQL shell.
# All statements must be terminated by a semicolon.
# To exit, type: \q.
#
# Server version: CockroachDB OSS v22.1.22-64-g86fdbfca06 (x86_64-pc-solaris2.11, built 2026/03/18 01:49:10, go1.22.11) (same version as client)
# Cluster ID: ac0f4d08-75ff-4db6-bdbc-a9773754f479
#
# Enter \? for a brief introduction.
#
root@[fd85:375e:4c4d:101::3]:32221/omicron> select id from blueprint;
                   id
----------------------------------------
  7295315e-01df-4e7b-950e-126b3b118f35
(1 row)


Time: 2ms total (execution 2ms / network 0ms)

root@[fd85:375e:4c4d:101::3]:32221/omicron> select * from bp_target;
  version |             blueprint_id             | enabled |       time_made_target
----------+--------------------------------------+---------+--------------------------------
       92 | 27e1db53-e347-49e4-81f7-68439b38ad1d |  true   | 2026-09-03 15:54:08.187906+00
       93 | c71ad319-35ab-4cab-96ae-8638341fbb03 |  true   | 2026-09-03 15:54:14.006108+00
       94 | 7295315e-01df-4e7b-950e-126b3b118f35 |  true   | 2026-09-03 15:54:19.84806+00
(3 rows)


Time: 1ms total (execution 1ms / network 0ms)

Looks good: one actual blueprint and three bp_target rows, the last of which points to our blueprint.

@davepacheco
davepacheco enabled auto-merge (squash) September 3, 2026 19:18
@davepacheco
davepacheco merged commit b2c7403 into main Sep 3, 2026
20 checks passed
@davepacheco
davepacheco deleted the dap/blueprint-archive-prune branch September 3, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants