Commit 599481c
authored
[Reconfigurator] Fix planner skipping RoT / bootloader updates (add
When trying Reconfigurator-based updates on a racklette today with a
real TUF repo, the planner skipped all the RoT bootloader and RoT
updates because none of the artifact `name`s matched the `board`s
reported in inventory. Our tests were assuming these were the same (and
in prod they _are_ the same on the SP), but in real TUF repos these
don't match: all the RoT and bootloaders report a `board` of
`oxide-rot-1`, but the artifact names are pretty varied.
This PR adds a new `board` value to the `tuf_artifact` table
and the `TufArtifactMeta` struct. Outside of tests, the changes are
almost identical to those from #8729 that added a `sign` field in this
same spot. This allows us to stop assuming that `artifact.name` ==
`inventory_caboose.board`, and instead check `artifact.board` ==
`inventory_caboose.board`. It depends on
oxidecomputer/tufaceous#40, which changes the
way our fake data is generated to be more consistent with the state of
production devices and artifacts. This perturbs some of the
reconfiguartor-cli tests a bit, which significantly inflates the diff;
the actual code changes here are pretty small.TufArtifactMeta::board) (#8872)1 parent a1d9cac commit 599481c
29 files changed
Lines changed: 450 additions & 862 deletions
File tree
- common/src/api/external
- dev-tools/reconfigurator-cli
- src
- tests
- input
- output
- nexus
- db-model/src
- db-queries/src/db/datastore
- db-schema/src
- inventory/tests/output
- reconfigurator/planning/src
- mgs_updates
- openapi
- schema/crdb
- add-tuf-artifact-board
- sp-sim/src
- update-common
- manifests
- src/artifacts
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3421 | 3421 | | |
3422 | 3422 | | |
3423 | 3423 | | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
3424 | 3431 | | |
3425 | 3432 | | |
3426 | 3433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| |||
1713 | 1713 | | |
1714 | 1714 | | |
1715 | 1715 | | |
1716 | | - | |
1717 | | - | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
1718 | 1720 | | |
1719 | 1721 | | |
1720 | 1722 | | |
1721 | 1723 | | |
1722 | 1724 | | |
1723 | 1725 | | |
1724 | | - | |
1725 | | - | |
| 1726 | + | |
1726 | 1727 | | |
1727 | 1728 | | |
1728 | 1729 | | |
1729 | 1730 | | |
1730 | 1731 | | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
| 1732 | + | |
1736 | 1733 | | |
1737 | 1734 | | |
1738 | 1735 | | |
| |||
Lines changed: 24 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | | - | |
135 | 146 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
139 | 151 | | |
140 | 152 | | |
141 | | - | |
142 | 153 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
146 | 158 | | |
147 | 159 | | |
148 | | - | |
149 | 160 | | |
150 | | - | |
| 161 | + | |
| 162 | + | |
151 | 163 | | |
152 | 164 | | |
153 | 165 | | |
| |||
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
| |||
0 commit comments