Skip to content

Commit cba3477

Browse files
committed
Handle containerd "CRIU not found" error message
During the PR to get "Forensic Container Checkpointing" enabled in containerd the decision was made to not correctly report if containerd cannot find the CRIU binary. The reason was that the e2e_node checkpoint test did not understand the error message. The e2e_node checkpoint test is skipped if the container runtime (CRI-O or containerd) does not enable checkpoint support of if checkpoint support is not implemented. This commit adds another reason to skip a check. If the underlying OS which is used to test "Forensic Container Checkpointing" in combination with containerd or CRI-O is missing the CRIU binary. This was encountered on Google's Container-Optimized OS (COS) based tests where CRIU was not installed. With this change merged it is possible for containerd to return the correct error message without breaking Kubernetes e2e tests. Signed-off-by: Adrian Reber <[email protected]>
1 parent 2010ca8 commit cba3477

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/e2e_node/checkpoint_container.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ var _ = SIGDescribe("Checkpoint Container", nodefeature.CheckpointContainer, fun
217217
// or
218218
// '(rpc error: code = Unknown desc = checkpoint/restore support not available)'
219219
// if the container engine explicitly disabled the checkpoint/restore support
220+
// or
221+
// '(rpc error: code = Unknown desc = CRIU binary not found or too old (<31600). Failed to checkpoint container'
222+
// if the CRIU binary was not found if it is too old
220223
if (int(statusError.ErrStatus.Code)) == http.StatusInternalServerError {
221224
if strings.Contains(
222225
statusError.ErrStatus.Message,
@@ -239,6 +242,13 @@ var _ = SIGDescribe("Checkpoint Container", nodefeature.CheckpointContainer, fun
239242
ginkgo.Skip("Container engine does not implement 'CheckpointContainer'")
240243
return
241244
}
245+
if strings.Contains(
246+
statusError.ErrStatus.Message,
247+
"(rpc error: code = Unknown desc = CRIU binary not found or too old (<31600). Failed to checkpoint container",
248+
) {
249+
ginkgo.Skip("Container engine reports missing or too old CRIU binary")
250+
return
251+
}
242252
}
243253
framework.Failf(
244254
"Unexpected status code (%d) during 'CheckpointContainer': %q",

0 commit comments

Comments
 (0)