File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
test/cases/nvidia/manifests Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,18 @@ spec:
2828 echo "=== content read by the container ==="
2929 cat /host-etc/containerd/config.toml
3030
31- # 2. Attempt to extract 'sandbox_image ' from the config
32- # If grep returns nothing, pipefail triggers an error
33- # OR you can explicitly check if the variable is empty
34- source <(grep sandbox_image /host-etc/ containerd/config.toml | tr -d ' "')
35-
36- # 3. If sandbox_image is missing , fail explicitly
37- if [ -z "$sandbox_image " ]; then
38- echo "FAIL: no sandbox_image line found"
31+ # 2. Attempt to extract 'sandbox ' from the config to be compatible with latest containerd config.
32+ # In containerd config version = 2 expect to find pattern `sandbox_image = "registry.k8s.io/pause:3.10.1"`
33+ # In containerd config version = 3 expect to find pattern `sandbox = 'registry.k8s.io/pause:3.10.1'`
34+ # For more details: https://github.com/ containerd/containerd/blob/main/docs/cri/ config.md
35+ sandbox_line=$(grep -E '(sandbox)\s*=' /host-etc/containerd/config.toml || true)
36+ # 3. If no sandbox configuration is found , fail explicitly
37+ if [ -z "$sandbox_line " ]; then
38+ echo "FAIL: no sandbox_image or sandbox line found"
3939 echo "=== debug ==="
4040 exit 1
4141 fi
42+ sandbox_image=$(echo "$sandbox_line" | cut -d'"' -f2)
4243
4344 # 4. Check that $sandbox_image references .ecr. or is provided on the instance
4445 if [[ "$sandbox_image" == "localhost"* ]]; then
You can’t perform that action at this time.
0 commit comments