From 827ab82a828feec7e021cc24623657d5b68639f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Feb 2022 21:18:07 +0100 Subject: [PATCH 1/2] tools: clh: Fix unbound variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4c164afbac3df0611a03f7dc774833ee51184178 renamed extra_build_args to features, but did it only in one place, leading to: ``` 21:15:28 /home/jenkins/workspace/kata-containers-2.0-ubuntu-ARM-PR/go/src/github.com/kata-containers/kata-containers/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh: line 55: features: unbound variable 21:15:29 make[1]: *** [tools/packaging/kata-deploy/local-build/Makefile:30: cloud-hypervisor-tarball-build] Error 1 ``` Fixes: #3775 Signed-off-by: Fabiano FidĂȘncio --- .../static-build/cloud-hypervisor/build-static-clh.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh b/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh index 1f49abcaa..cf2aaec38 100755 --- a/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh +++ b/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh @@ -16,7 +16,7 @@ ARCH=$(uname -m) script_dir=$(dirname $(readlink -f "$0")) kata_version="${kata_version:-}" force_build_from_source="${force_build_from_source:-false}" -extra_build_args="${extra_build_args:-}" +features="${features:-}" source "${script_dir}/../../scripts/lib.sh" @@ -68,7 +68,7 @@ if [ "${ARCH}" == "aarch64" ]; then force_build_from_source="true" fi -if [ -n "${extra_build_args}" ]; then +if [ -n "${features}" ]; then info "As an extra build argument has been passed to the script, forcing to build from source" force_build_from_source="true" fi From a9ba7c132b174e3209ca1d7d93bb4aa29d5f0c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Feb 2022 22:29:11 +0100 Subject: [PATCH 2/2] clh: Fix typo on HotplugRemoveDevice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A copy and paste mistake was made and the error on HotplugRemoveDevice() should be about removal and not about addition. Signed-off-by: Fabiano FidĂȘncio --- src/runtime/virtcontainers/clh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index 11c1f7e35..22a8bec02 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -657,7 +657,7 @@ func (clh *cloudHypervisor) HotplugRemoveDevice(ctx context.Context, devInfo int defer span.End() if clh.config.ConfidentialGuest { - return nil, errors.New("Device hotplug addition is not supported in confidential mode") + return nil, errors.New("Device hotplug removal is not supported in confidential mode") } var deviceID string