mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Dump info on coredns when deployment rollout fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
746904eb03
commit
027039530d
10
tests/install/centos-7/Vagrantfile
vendored
10
tests/install/centos-7/Vagrantfile
vendored
@ -42,6 +42,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
|
10
tests/install/fedora-coreos/Vagrantfile
vendored
10
tests/install/fedora-coreos/Vagrantfile
vendored
@ -42,6 +42,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
|
10
tests/install/opensuse-leap/Vagrantfile
vendored
10
tests/install/opensuse-leap/Vagrantfile
vendored
@ -44,6 +44,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
|
10
tests/install/opensuse-microos/Vagrantfile
vendored
10
tests/install/opensuse-microos/Vagrantfile
vendored
@ -45,6 +45,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
|
10
tests/install/rocky-8/Vagrantfile
vendored
10
tests/install/rocky-8/Vagrantfile
vendored
@ -43,6 +43,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
|
12
tests/install/ubuntu-focal/Vagrantfile
vendored
12
tests/install/ubuntu-focal/Vagrantfile
vendored
@ -42,6 +42,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
@ -97,4 +107,4 @@ Vagrant.configure("2") do |config|
|
||||
v.gui = false
|
||||
v.check_guest_additions = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -73,6 +73,16 @@ Vagrant.configure("2") do |config|
|
||||
sh.inline = <<~SHELL
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
function describe-coredns {
|
||||
RC=$?
|
||||
if [[ $RC -ne 0 ]]; then
|
||||
kubectl describe node
|
||||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns
|
||||
kubectl --namespace kube-system logs -l k8s-app=kube-dns
|
||||
fi
|
||||
exit $RC
|
||||
}
|
||||
trap describe-coredns EXIT
|
||||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
|
||||
SHELL
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user