-
Notifications
You must be signed in to change notification settings - Fork 334
Debug info ci failures #3400
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
Merged
Merged
Debug info ci failures #3400
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bd0b6aa
add bash logic to find more context of why things go wrong
jschaul 4ab003c
fail to schedule rabbit; and fail to start brig to see if the logs ar…
jschaul 5f7a88c
changelog
jschaul 002d49f
fixup
jschaul 39a28f0
PR feedback
jschaul 8276754
take bash from env
jschaul a7db990
undo one on-purpose-unschedulable bug
jschaul 62762f2
no need for context before Events:
jschaul 9621754
undo brig misconfiguration
jschaul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| On CI runs, provide additional context when 'helmfile install' fails. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| USAGE="$0 <NAMESPACE>" | ||
| NAMESPACE=${1:?$USAGE} | ||
|
|
||
| echo "Checking pods in namespace '${NAMESPACE}' that failed to schedule..." | ||
|
|
||
| # Get pods that failed to schedule | ||
| UNSCHEDULED_PODS=$(kubectl get pods --namespace "$NAMESPACE" -o json | jq -r '.items[] | select(.status.phase=="Pending") | .metadata.name') | ||
|
|
||
| for POD in $UNSCHEDULED_PODS; do | ||
| echo "Pod $POD failed to schedule for the following reasons:" | ||
| # Get events for pod | ||
| kubectl describe pod "$POD" --namespace "$NAMESPACE" | grep -A 10 "Events:" | ||
| echo "" | ||
| done | ||
|
|
||
| echo "Checking pods in namespace '${NAMESPACE}' that are crashlooping..." | ||
|
|
||
| # Get pods that are crashlooping | ||
| CRASHLOOPING_PODS=$(kubectl get pods --namespace "$NAMESPACE" -o json | jq -r '.items[] | select(.status.containerStatuses[]?.state.waiting.reason=="CrashLoopBackOff") | .metadata.name') | ||
|
|
||
| for POD in $CRASHLOOPING_PODS; do | ||
| echo "Pod $POD is crashlooping for the following reasons:" | ||
| # Get logs of previous run for pod | ||
| kubectl logs "$POD" --namespace "$NAMESPACE" --previous | ||
| echo "" | ||
| done | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grepping out
Normalmight create red herrings because I guess we won't know if things got better. How much noise does this save?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of noise. It's 95% normal events. The events only show if helm install fails - and then these warnings/errors are likely indicative of a problem, even if sometimes unrelated to the failure, I suppose often there's something to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense