Commit 8e9d0d0
committed
fix(appliance): an expired deadline stops locking the operator out
A verification deadline that is armed disables both the update and the revert
control. The comment above the gate already says why, and already says the right
rule: "A deadline in flight is the one state that blocks both buttons: a second
install would replace the package whose verdict the appliance is still waiting
for." The code did not check in flight. It checked whether a deadline file
exists.
On the appliance that found this, a deadline armed for 0.2.0 sat past its window
with the verdict still pending, and nothing ever judged it. Both controls were
dead. The documented cure is `systemctl start
ems-appliance-manager-verify.service` -- a keyboard at the console, which the
ADR names as the backstop rather than the plan, and which an appliance owner
often does not have. The timer was enabled, its symlink present in
timers.target.wants, and it still never ran; that cause is not diagnosed here.
An expired deadline can no longer revert anything: its window is what gave it
the right to. Holding both controls shut on it protects nothing that the window
could still protect, and takes away the last lever there is. So the gate now
blocks while the window has not passed, and lets go when it has, which is what
the comment said all along.
Judged by the appliance's own clock, not the browser's: that clock belongs to a
different machine, and this board has no real-time clock. A clock the console
cannot read keeps the lock, because a deadline it cannot place in time is one
that may still fire.
The card stops lying too. "Waiting for the deadline" and "nothing else can be
started until it settles" become "the deadline passed and nothing judged it",
saying plainly that nothing was reverted and nothing will be, and naming the
timer to look at when it recurs.
The clock is a parameter rather than a read of `state`. Taking it from the
global broke every test in test_appliance_manager_frontend.py at once, which is
that module's whole point: both decisions are derived from backend values alone,
so they can be evaluated without a page around them. The signature contract now
pins the arity, and two cases pin the rule directly -- one deadline at 999 and
1001 against an epoch of 1000, and a clock of 0, null and "later" that all keep
the lock.
Nothing about what may be installed changes. The deadline is still armed by the
outgoing package, still runs a reverter copied out of it, and still reverts an
install that does not prove itself inside the window.1 parent a34aa05 commit 8e9d0d0
4 files changed
Lines changed: 124 additions & 20 deletions
File tree
- appliance/static
- tests
- e2e-appliance
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1200 | 1200 | | |
1201 | 1201 | | |
1202 | 1202 | | |
1203 | | - | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1204 | 1213 | | |
1205 | 1214 | | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1206 | 1224 | | |
1207 | 1225 | | |
1208 | | - | |
1209 | | - | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1210 | 1230 | | |
1211 | 1231 | | |
1212 | 1232 | | |
| |||
1239 | 1259 | | |
1240 | 1260 | | |
1241 | 1261 | | |
1242 | | - | |
| 1262 | + | |
1243 | 1263 | | |
1244 | 1264 | | |
1245 | 1265 | | |
| |||
1265 | 1285 | | |
1266 | 1286 | | |
1267 | 1287 | | |
| 1288 | + | |
1268 | 1289 | | |
1269 | 1290 | | |
1270 | 1291 | | |
| |||
1305 | 1326 | | |
1306 | 1327 | | |
1307 | 1328 | | |
1308 | | - | |
| 1329 | + | |
1309 | 1330 | | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1314 | 1337 | | |
1315 | 1338 | | |
1316 | 1339 | | |
1317 | 1340 | | |
1318 | 1341 | | |
1319 | 1342 | | |
1320 | | - | |
| 1343 | + | |
1321 | 1344 | | |
1322 | 1345 | | |
1323 | 1346 | | |
| |||
1326 | 1349 | | |
1327 | 1350 | | |
1328 | 1351 | | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1329 | 1362 | | |
1330 | 1363 | | |
1331 | 1364 | | |
| |||
1350 | 1383 | | |
1351 | 1384 | | |
1352 | 1385 | | |
1353 | | - | |
| 1386 | + | |
1354 | 1387 | | |
1355 | 1388 | | |
1356 | 1389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
868 | 890 | | |
869 | 891 | | |
870 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
338 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
339 | 344 | | |
340 | 345 | | |
341 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | | - | |
| 81 | + | |
83 | 82 | | |
84 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
113 | 157 | | |
114 | 158 | | |
115 | 159 | | |
| |||
0 commit comments