Skip to content

Commit

Permalink
Misc kubevirt kube container changes
Browse files Browse the repository at this point in the history
- Component version bumps for perf improvements:
   longhorn 1.6.3
   cdi 1.57.1
- containerd config change required for cdi 1.57.1
- event-ttl bump to improve ability to debug system
- collect-info kubectl dumps for completeness to debug state

Signed-off-by: Andrew Durbin <andrewd@zededa.com>
  • Loading branch information
andrewd-zededa committed Jan 28, 2025
1 parent 4b979bf commit 1e06ecb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
16 changes: 16 additions & 0 deletions pkg/debug/scripts/collect-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ collect_kube_info()
echo "============"
eve exec kube kubectl describe pods -A
echo "============"
echo "kubectl get rs -A"
echo "============"
eve exec kube kubectl get rs -A
echo "============"
echo "kubectl describe rs -A"
echo "============"
eve exec kube kubectl describe rs -A
echo "============"
echo "kubectl get pvc -A"
echo "============"
eve exec kube kubectl get pvc -A
Expand All @@ -344,6 +352,14 @@ collect_kube_info()
echo "============"
eve exec kube kubectl describe vmi -A
echo "============"
echo "kubectl get vmirs -A"
echo "============"
eve exec kube kubectl get vmirs -A
echo "============"
echo "kubectl describe vmirs -A"
echo "============"
eve exec kube kubectl describe vmirs -A
echo "============"
echo "kubectl get kubevirt -n kubevirt -o yaml"
echo "============"
eve exec kube kubectl get kubevirt -n kubevirt -o yaml
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/cluster-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

KUBEVIRT_VERSION=v1.1.0
CDI_VERSION=v1.54.0
CDI_VERSION=v1.57.1
NODE_IP=""
RESTART_COUNT=0
K3S_LOG_DIR="/persist/kubelog"
Expand Down
1 change: 1 addition & 0 deletions pkg/kube/config-k3s.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ root = "/persist/vault/containerd"
enable_unprivileged_ports = true
enable_unprivileged_icmp = true
sandbox_image = "rancher/mirrored-pause:3.6"
device_ownership_from_security_context = true

[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "overlayfs"
Expand Down
2 changes: 2 additions & 0 deletions pkg/kube/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ etcd-expose-metrics: true
container-runtime-endpoint: "/run/containerd-user/containerd.sock"
disable-network-policy: true
disable-cloud-controller: true
kube-apiserver-arg:
- "event-ttl=72h"
2 changes: 1 addition & 1 deletion pkg/kube/longhorn-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2024 Zededa, Inc.
# SPDX-License-Identifier: Apache-2.0

LONGHORN_VERSION=v1.6.2
LONGHORN_VERSION=v1.6.3

longhorn_install() {
node_name=$1
Expand Down
14 changes: 10 additions & 4 deletions pkg/kube/nsmounter
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
# mount RWX volumes for longhorn
#
target_pid=1
kube_pid=$(pgrep -f "cluster-init.sh")
if [ -n "$kube_pid" ]; then
target_pid=$kube_pid
fi
starting_pid=$$
while [ "$starting_pid" != "1" ]; do
ppid=$(grep PPid "/proc/${starting_pid}/status" | cut -d ':' -f 2 | tr -d '\t')
echo "proc:$starting_pid has ppid:$ppid"
if grep -q containerd "/proc/${ppid}/cmdline"; then
target_pid=$ppid
break
fi
starting_pid=$ppid
done
nsenter -t "$target_pid" -m -n -u -- "$@"

0 comments on commit 1e06ecb

Please sign in to comment.