mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 03:42:09 +00:00
kata-deploy: Fix CRI-O detection
Some of the "k8s distros" allow using CRI-O in a non-official way, and if that's done we cannot simply assume they're on containerd, otherwise kata-deploy will simply not work. In order to avoid such issue, let's check for `cri-o` as the container engine as the first place and only proceed with the checks for the "k8s distros" after we rule out that CRI-O is not being used. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
ebaa4fa4c1
commit
358dc2f569
@ -75,7 +75,9 @@ function get_container_runtime() {
|
||||
die "invalid node name"
|
||||
fi
|
||||
|
||||
if echo "$runtime" | grep -qE 'containerd.*-k3s'; then
|
||||
if echo "$runtime" | grep -qE "cri-o"; then
|
||||
echo "cri-o"
|
||||
elif echo "$runtime" | grep -qE 'containerd.*-k3s'; then
|
||||
if host_systemctl is-active --quiet rke2-agent; then
|
||||
echo "rke2-agent"
|
||||
elif host_systemctl is-active --quiet rke2-server; then
|
||||
|
Loading…
Reference in New Issue
Block a user