Commit 44ae7aa4 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Dump info on coredns when deployment rollout fails

parent a75bbf5f
...@@ -42,6 +42,16 @@ Vagrant.configure("2") do |config| ...@@ -42,6 +42,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
SHELL SHELL
end end
......
...@@ -42,6 +42,16 @@ Vagrant.configure("2") do |config| ...@@ -42,6 +42,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
SHELL SHELL
end end
......
...@@ -44,6 +44,16 @@ Vagrant.configure("2") do |config| ...@@ -44,6 +44,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns); do sleep 5; done'
SHELL SHELL
end end
......
...@@ -45,6 +45,16 @@ Vagrant.configure("2") do |config| ...@@ -45,6 +45,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
SHELL SHELL
end end
......
...@@ -43,6 +43,16 @@ Vagrant.configure("2") do |config| ...@@ -43,6 +43,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
SHELL SHELL
end end
......
...@@ -42,6 +42,16 @@ Vagrant.configure("2") do |config| ...@@ -42,6 +42,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
SHELL SHELL
end end
...@@ -97,4 +107,4 @@ Vagrant.configure("2") do |config| ...@@ -97,4 +107,4 @@ Vagrant.configure("2") do |config|
v.gui = false v.gui = false
v.check_guest_additions = false v.check_guest_additions = false
end end
end end
\ No newline at end of file
...@@ -73,6 +73,16 @@ Vagrant.configure("2") do |config| ...@@ -73,6 +73,16 @@ Vagrant.configure("2") do |config|
sh.inline = <<~SHELL sh.inline = <<~SHELL
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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' time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done'
SHELL SHELL
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment