Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc kubevirt kube container changes #4508

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion pkg/debug/scripts/collect-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Script version, don't forget to bump up once something is changed

VERSION=32
VERSION=33
# Add required packages here, it will be passed to "apk add".
# Once something added here don't forget to add the same package
# to the Dockerfile ('ENV PKGS' line) of the debug container,
Expand Down 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 -- "$@"
Loading