Sysbox 0.6.7 installation fails on RKE2 v1.32 ad later Kubernetes cluster due to incompatibility in get_runtime_kubelet_rke2() function of sysbox-pkgr/k8s/scripts /kubelet-config-helper.sh
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, kubernetes, shell
- Área
- devops, infrastructure
Línea de trabajo
Comienza en sysbox-pkgr/k8s/scripts/kubelet-config-helper.sh, en get_runtime_kubelet_rke2(), e inspecciona cómo do_config_kubelet_rke2() utiliza su valor de runtime. Comprueba la configuración de kubelet de RKE2 v1.32 en /var/lib/rancher/rke2/agent/etc/kubelet.conf.d/00-rke2-defaults.conf junto con la búsqueda heredada en la línea de comandos y, después, verifica la instalación con configuraciones de containerd y CRI-O.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The function get_runtime_kubelet_rke2() in sysbox-pkgr/k8s/scripts /kubelet-config-helper.sh returns an empty string for RKE2 v1.32.9+rke2r1 instead the current runtime of kubelet:
runtime=$(ps -e -o command | egrep kubelet | egrep -o "container-runtime-endpoint=\S*" | cut -d '=' -f2)
The following function is bailing out due to $runtime being set to "unix:///var/run/dockershim.sock" durig sysbox install:
function do_config_kubelet_rke2() {
echo "Detected RKE2's host-based kubelet deployment on host."
# Obtain current runtime.
get_runtime_kubelet_rke2
if [[ ${runtime} =~ "crio" ]]; then
echo "Kubelet is already using CRI-O; no action will be taken."
return
fi
# No runtime other than containerd, and obviously crio, is expected in an
# rke2 deployment.
if [[ ! ${runtime} =~ "containerd" ]]; then
echo "Unsupported runtime for RKE2 scenario: $runtime"
return
fi
In RKE2 v1.32 the config for the kubelet runtime is located in file /var/lib/rancher/rke2/agent/etc/kubelet.conf.d/00-rke2-defaults.conf in line
containerRuntimeEndpoint: unix:///run/k3s/containerd/containerd.sock
or
containerRuntimeEndpoint: unix:///var/run/crio/crio.sock
The proposed fix for the get_runtime_kubelet_rke2() function is:
function get_runtime_kubelet_rke2() {
set +e
# Try RKE2 v1.32+ config file first
local rke2_config="/var/lib/rancher/rke2/agent/etc/kubelet.conf.d/00-rke2-defaults.conf"
if [[ -f "$rke2_config" ]]; then
runtime=$(grep "^containerRuntimeEndpoint:" "$rke2_config" | awk '{print $2}')
fi
# Fallback to legacy kubelet command line parameter for older versions
if [[ -z "$runtime" ]]; then
runtime=$(ps -e -o command | grep kubelet | grep -o "container-runtime-endpoint=\S*" | cut -d '=' -f2)
fi
# If runtime is still unknown, assume it's Docker
if [[ -z "$runtime" ]]; then
runtime="unix:///var/run/dockershim.sock"
fi
set -e
}
- Lenguaje dominante
- Shell
- Estrellas
- 3.9k
- Forks
- 230
- Merge medio
- 11 h 18 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nestybox/sysbox
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
0.7.1: /sys/class/net inside a sysbox container lists the host's interfaces, not the container'sAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de nestybox/sysbox
Issues similares
-
Feature Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
project-chip/certification-tool#1154 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
beehive-lab/TornadoVM#1151 ·
Los mantenedores suelen responder en 1 día
-
component/tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NVIDIA/nodewright#735 ·
Los mantenedores suelen responder en 1 día
-
writing-plans: user-facing text that describes app behaviour should cite the code it describesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
obra/superpowers#2433 ·
Los mantenedores suelen responder en 5 días