Commit b8bb31e
Roy Lin
fix(box): CRI RemoveContainer force-removes a running container
Per the CRI spec, RemoveContainer must remove a container even when it is
running (stopping it first), but BoxRuntimeService rejected a running
container with FailedPrecondition ("requires a stopped container"), so
`critest` "should support removing running container [Conformance]"
failed. RemoveContainer now force-stops a running container (timeout 0,
reusing stop_container's workload-stop + sandbox-VM-teardown path and the
multi-container guard) before deleting it.
Verified on the KVM server: the conformance spec now passes. Test
test_remove_container_rejects_running_container updated accordingly
(renamed to ..._force_stops_running_container).1 parent 69e4d1c commit b8bb31e
2 files changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1179 | 1183 | | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1184 | 1189 | | |
1185 | 1190 | | |
1186 | 1191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2650 | 2650 | | |
2651 | 2651 | | |
2652 | 2652 | | |
2653 | | - | |
| 2653 | + | |
2654 | 2654 | | |
2655 | 2655 | | |
2656 | 2656 | | |
| |||
2661 | 2661 | | |
2662 | 2662 | | |
2663 | 2663 | | |
| 2664 | + | |
| 2665 | + | |
2664 | 2666 | | |
2665 | 2667 | | |
2666 | 2668 | | |
2667 | 2669 | | |
2668 | 2670 | | |
2669 | 2671 | | |
2670 | | - | |
2671 | | - | |
2672 | | - | |
2673 | | - | |
2674 | | - | |
| 2672 | + | |
| 2673 | + | |
2675 | 2674 | | |
2676 | 2675 | | |
2677 | 2676 | | |
| |||
0 commit comments