kata-deploy: Fix shim check for snapshotter configuration

We want to check whether the shim is part of the "plain text" shims
passed to the daemonset (meaning, checking against `$SHIMS`).  Before
this fix we were checking against `$shims`, which is an array of shims
instead of a string, resulting on a broken check.

Fixes: #8732

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-12-26 07:42:36 -03:00
parent a4ad12a3d1
commit 907f1ddb9e
No known key found for this signature in database
GPG Key ID: EE926C2BDACC177B

View File

@ -481,7 +481,7 @@ function snapshotter_handler_mapping_validation_check() {
die "The snapshotter must follow the \"shim:snapshotter,shim:snapshotter,...\" format, but at least one snapshotter is empty"
fi
if ! grep -q " $shim " <<< " $shims "; then
if ! grep -q " $shim " <<< " $SHIMS "; then
die "\"$shim\" is not part of \"$SHIMS\""
fi