From 5fdbdaafd3e53588c8f8a3bdce4bca2b18b7816e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 4 Apr 2022 15:08:27 +0200 Subject: [PATCH] ccv0: Don't use the QEMU process to get the sandbox ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead, rely on the conntainerd-shim-kata-v2 process, as this makes this script VMM agnostic. Signed-off-by: Fabiano FidĂȘncio --- docs/how-to/ccv0.sh | 2 +- docs/how-to/how-to-build-and-test-ccv0.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/how-to/ccv0.sh b/docs/how-to/ccv0.sh index a1fc01d3de..3f6d10c589 100755 --- a/docs/how-to/ccv0.sh +++ b/docs/how-to/ccv0.sh @@ -467,7 +467,7 @@ run_kata_and_capture_logs() { get_ids() { guest_cid=$(sudo ss -H --vsock | awk '{print $6}' | cut -d: -f1) - sandbox_id=$(ps -ef | grep qemu | egrep -o "sandbox-[^,][^,]*" | sed 's/sandbox-//g' | awk '{print $1}') + sandbox_id=$(ps -ef | grep containerd-shim-kata-v2 | egrep -o "id [^,][^,].* " | awk '{print $2}') } open_kata_shell() { diff --git a/docs/how-to/how-to-build-and-test-ccv0.md b/docs/how-to/how-to-build-and-test-ccv0.md index 1f5ea11e42..8321a0d622 100644 --- a/docs/how-to/how-to-build-and-test-ccv0.md +++ b/docs/how-to/how-to-build-and-test-ccv0.md @@ -189,7 +189,7 @@ there. pulled on the guest: - Find all the `rootfs` directories under in the pod's shared directory with: ```bash - $ pod_id=$(ps -ef | grep qemu | egrep -o "sandbox-[^,][^,]*" | sed 's/sandbox-//g' | awk '{print $1}') + $ pod_id=$(ps -ef | grep containerd-shim-kata-v2 | egrep -o "id [^,][^,].* " | awk '{print $2}') $ sudo find /run/kata-containers/shared/sandboxes/${pod_id}/shared -name rootfs ``` which should only show a single `rootfs` directory if the container image was pulled on the guest, not the host