From b4bbbf65c632a760a23cc080ed740c1437ca6d48 Mon Sep 17 00:00:00 2001 From: Sumedh Alok Sharma Date: Wed, 11 Sep 2024 11:47:13 +0530 Subject: [PATCH] ci: Do not start CDH/attestation procs with kata-agent as local process. Since CDH/attestation related processes and its dependencies are not fully available, the setup fails to start kata-agent as local process. This fix removes these procs to prevent kata-agent from trying to start them. Signed-off-by: Sumedh Alok Sharma --- .../kata-agent-apis/run-agent-api-tests.sh | 2 ++ tests/functional/kata-agent-apis/setup_common.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/functional/kata-agent-apis/run-agent-api-tests.sh b/tests/functional/kata-agent-apis/run-agent-api-tests.sh index b2f9a74856..53f593adeb 100755 --- a/tests/functional/kata-agent-apis/run-agent-api-tests.sh +++ b/tests/functional/kata-agent-apis/run-agent-api-tests.sh @@ -50,6 +50,8 @@ main() install_policy_doc + try_and_remove_coco_attestation_procs + setup_agent run_tests diff --git a/tests/functional/kata-agent-apis/setup_common.sh b/tests/functional/kata-agent-apis/setup_common.sh index 59e2b08b60..1c60409508 100755 --- a/tests/functional/kata-agent-apis/setup_common.sh +++ b/tests/functional/kata-agent-apis/setup_common.sh @@ -198,3 +198,17 @@ install_policy_doc() [ ! -f $policy_file ] && sudo ln -s $local_policy_file $policy_file || die "Failed to setup local policy file, exists: $policy_file" } + +# Same reason as above, we do not have the necessary components to start the coco processes +# in this setup. So removing them before starting kata agent process +try_and_remove_coco_attestation_procs() +{ + info "Removing coco attestation process for now" + coco_procs=( "attestation-agent" "confidential-data-hub" "api-server-rest") + local procs_path="/usr/local/bin/" + + for i in "${coco_procs[@]}"; do + info "Moving ${i} to /tmp" + [ -f "${procs_path}${i}" ] && sudo mv "${procs_path}${i}" /tmp || true + done +}