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 <sumsharma@microsoft.com>
This commit is contained in:
Sumedh Alok Sharma
2024-09-11 11:47:13 +05:30
parent 8045a7a2ba
commit b4bbbf65c6
2 changed files with 16 additions and 0 deletions

View File

@@ -50,6 +50,8 @@ main()
install_policy_doc
try_and_remove_coco_attestation_procs
setup_agent
run_tests

View File

@@ -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
}