From 8f8c2215f470f93830c61143442567751a9d9ac7 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 22 Jun 2022 16:45:47 +0100 Subject: [PATCH 1/2] doc: Update crictl pod-config - Ensure that our documented crictl pod config file contents have uid and namespace fields for compatibility with crictl 1.24+ Fixes: #4513 Signed-off-by: stevenhorsman --- docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md | 2 ++ docs/how-to/how-to-use-virtio-fs-nydus-with-kata.md | 1 + docs/how-to/how-to-use-virtio-mem-with-kata.md | 2 ++ 3 files changed, 5 insertions(+) diff --git a/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md b/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md index 8ab9e89e5d..d9b250b3be 100644 --- a/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md +++ b/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md @@ -27,6 +27,8 @@ $ image="quay.io/prometheus/busybox:latest" $ cat << EOF > "${pod_yaml}" metadata: name: busybox-sandbox1 + uid: $(uuidgen) + namespace: default EOF $ cat << EOF > "${container_yaml}" metadata: diff --git a/docs/how-to/how-to-use-virtio-fs-nydus-with-kata.md b/docs/how-to/how-to-use-virtio-fs-nydus-with-kata.md index 9b04d49cf2..0ea8bf73f7 100644 --- a/docs/how-to/how-to-use-virtio-fs-nydus-with-kata.md +++ b/docs/how-to/how-to-use-virtio-fs-nydus-with-kata.md @@ -32,6 +32,7 @@ The `nydus-sandbox.yaml` looks like below: metadata: attempt: 1 name: nydus-sandbox + uid: nydus-uid namespace: default log_directory: /tmp linux: diff --git a/docs/how-to/how-to-use-virtio-mem-with-kata.md b/docs/how-to/how-to-use-virtio-mem-with-kata.md index 0c838927a9..40465bbe53 100644 --- a/docs/how-to/how-to-use-virtio-mem-with-kata.md +++ b/docs/how-to/how-to-use-virtio-mem-with-kata.md @@ -42,6 +42,8 @@ $ image="quay.io/prometheus/busybox:latest" $ cat << EOF > "${pod_yaml}" metadata: name: busybox-sandbox1 + uid: $(uuidgen) + namespace: default EOF $ cat << EOF > "${container_yaml}" metadata: From 2e5c4a9245e6c1d7a34e6b2069b4399d7efd26a6 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 22 Jun 2022 16:48:24 +0100 Subject: [PATCH 2/2] CCv0: Update script to use new lib method - Update `ccv0.sh` to use the new lib method which updates the CC pod config yaml to add a a unique id for compatibility with crictl 1.24.0+ Fixes: #4867 Depends-on: github.com/kata-containers/tests#4867 Signed-off-by: stevenhorsman --- docs/how-to/ccv0.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/how-to/ccv0.sh b/docs/how-to/ccv0.sh index ab757b4144..5206980c39 100755 --- a/docs/how-to/ccv0.sh +++ b/docs/how-to/ccv0.sh @@ -432,8 +432,8 @@ call_crictl_create_cc_pod() { # Update iptables to allow forwarding to the cni0 bridge avoiding issues caused by the docker0 bridge sudo iptables -P FORWARD ACCEPT - # Create crictl pod config - local pod_config="${FIXTURES_DIR}/pod-config.yaml" + # get_pod_config in tests_common exports `pod_config` that points to the prepared pod config yaml + get_pod_config crictl_delete_cc_pod_if_exists "${crictl_sandbox_name}" crictl_create_cc_pod "${pod_config}" @@ -442,7 +442,9 @@ call_crictl_create_cc_pod() { call_crictl_create_cc_container() { # Create container configuration yaml based on our test copy of busybox - local pod_config="${FIXTURES_DIR}/pod-config.yaml" + # get_pod_config in tests_common exports `pod_config` that points to the prepared pod config yaml + get_pod_config + local container_config="${FIXTURES_DIR}/${CONTAINER_CONFIG_FILE:-container-config.yaml}" local pod_name=${crictl_sandbox_name} crictl_create_cc_container ${pod_name} ${pod_config} ${container_config}