Skip to content

Commit fa779b2

Browse files
authored
[1/n] [reconfigurator-cli] in cmds-mupdate-update-flow, apply sled agent configs (#10408)
In `cmds-mupdate-update-flow.txt`, add `sled-set omicron-config latest` commands before setting the mupdate override field for these sleds. Without these, the simulated sled-agent's reported reconciled generation lags behind the parent blueprint's per-sled generation, which ends up breaking forthcoming work to detect stale inventory collections while initially setting the "will remove mupdate override" field within blueprints. This test-only PR is separated out into its own commit to try and minimize the diff for the forthcoming functional change. As a result of this change, within the test, sled 0 now applies a previously-pending zone expungement (`internal_dns 427ec88f`). As a result, the planner confirms the expungement and adds a replacement zone (`cfc72ddd`, artifact 2.0.0). But this is actually a bug -- on a sled with a mupdate override, replacement zones should come from the install dataset. See #10420.
1 parent 7c6ad41 commit fa779b2

2 files changed

Lines changed: 206 additions & 42 deletions

File tree

dev-tools/reconfigurator-cli/tests/input/cmds-mupdate-update-flow.txt

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@ sled-update-install-dataset serial0 --to-target-release
1515
# Set one of sled 0's zone's image sources to a specific artifact, and
1616
# also set MGS and host phase 2 updates on the sled. Both should be
1717
# reset as part of this process.
18+
#
19+
# Note that this isn't quite a typical blueprint, since it'll have
20+
# some image sources set to Artifact and others to InstallDataset.
21+
# (Typically, all zones on a sled are one or the other.) We consider that
22+
# to be okay for this test: we want to ensure that any zones with Artifact
23+
# image sources are converted over to InstallDataset.
1824
blueprint-edit latest set-zone-image 0c71b3b2-6ceb-4e8f-b020-b08675e83038 artifact 1.2.3 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
1925
blueprint-edit latest set-sp-update serial0 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1.1.0 sp 1.0.0 1.0.1
2026
blueprint-edit latest set-host-phase2 serial0 A artifact 1.0.0 3a9607047b03ccaab6d222249d890e93ca51b94ad631c7ca38be74cba60802ff
2127
blueprint-edit latest set-host-phase2 serial0 B artifact 1.0.0 044d45ad681b44e89c10e056cabdedf19fd8b1e54bc95e6622bcdd23f16bc8f2
2228

29+
# Apply the blueprint edits to sled 0.
30+
sled-set serial0 omicron-config latest
31+
2332
# Simulate a mupdate on sled 0 by setting the mupdate override field to a
2433
# new UUID (generated using uuidgen).
2534
sled-set serial0 mupdate-override 6123eac1-ec5b-42ba-b73f-9845105a9971
@@ -81,6 +90,10 @@ sled-set serial0 mupdate-override unset
8190
sled-set serial0 inventory-visible
8291
sled-set serial0 omicron-config latest
8392

93+
# Apply this config (which sets remove_mupdate_override to 203fa72c)
94+
# on sled 2.
95+
sled-set serial2 omicron-config latest
96+
8497
# But simulate a second mupdate on sled 2. This should invalidate the existing
8598
# mupdate override on sled 2 and cause another target release minimum
8699
# generation bump.
@@ -93,12 +106,21 @@ inventory-generate
93106
blueprint-plan latest latest
94107

95108
# Diff the blueprints. This diff should show:
96-
# * on sled 0:
97-
# * the "remove mupdate override" line going away
98-
# * no-op image source switches from install dataset to artifact
99-
# * on sled 1, no changes
100-
# * on sled 2, a _change_ in the will-remove-mupdate-override field
101-
# * another bump to the target release minimum generation, this time to 4.
109+
#
110+
# * for sled 0:
111+
# * "+ will remove mupdate override"
112+
# * for zone 0c71b3b2-6ceb-4e8f-b020-b08675e83038, a change from artifact to install-dataset
113+
# * measurements changed from unknown to install dataset
114+
# * host phase 2 contents reset to current contents
115+
# * the pending MGS update cleared
116+
# * for sled 1 (which has the mupdate override error): the planner cannot
117+
# record the override id, but it still clears the pending MGS update and
118+
# resets host phase 2 contents to current contents
119+
# * for sled 2:
120+
# * "+ will remove mupdate override"
121+
# * measurements changed from unknown to install dataset
122+
# * the target release's minimum generation bumped from 1 to 3
123+
# (the 3 is because generation 2 is repo-1.0.0.zip)
102124
blueprint-diff latest
103125

104126
# Clear the mupdate override on sled 2, signifying that the config has been
@@ -206,6 +228,11 @@ blueprint-diff latest
206228
# With the option disabled (the current state), the planner will
207229
# not proceed with adding new zones. But with the option enabled,
208230
# new zones will be added.
231+
232+
# Apply the blueprint edits to sled 0. This also lets the planner see
233+
# that the internal_dns zone is expunged, setting up a replacement
234+
# internal_dns zone.
235+
sled-set serial0 omicron-config latest
209236
sled-set serial0 mupdate-override c8fba912-63ae-473a-9115-0495d10fb3bc
210237
sled-add c3bc4c6d-fdde-4fc4-8493-89d2a1e5ee6b
211238
inventory-generate
@@ -218,12 +245,20 @@ blueprint-diff latest
218245
# This *will* generate the datasets and internal NTP zone on the new sled.
219246
set planner-config --add-zones-with-mupdate-override true
220247
blueprint-plan latest latest
248+
# TODO: This blippy run produces two FATAL notes, due to, respectively:
249+
#
250+
# * https://github.com/oxidecomputer/omicron/issues/10420
251+
# * https://github.com/oxidecomputer/omicron/pull/10363
252+
blueprint-blippy latest
221253
blueprint-diff latest
222254

223255
# Set the target release minimum generation to a large value -- we're going to
224256
# test that the planner bails if it attempts a rollback of the target release
225257
# minimum generation.
226258
blueprint-edit latest set-target-release-min-gen 1000
259+
260+
# Apply this config to sled 1 before the new MUPdate below.
261+
sled-set serial1 omicron-config latest
227262
sled-set serial1 mupdate-override cc724abe-80c1-47e6-9771-19e6540531a9
228263
inventory-generate
229264
blueprint-plan latest latest

0 commit comments

Comments
 (0)