-
Notifications
You must be signed in to change notification settings - Fork 6
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
PB-4396 Added code to capture pod's description incase of failure #311
Conversation
OSS Scan Results:
Total issues: 0 |
License Evaluation Results:
Total License Issues: 19 |
@shkumari-px The unit test result is not latest ? I see your name in that log.. Paste latest result of a failure scenario. |
Looks like you have closed the previous PR. Let's not do that. Rather we should always amend or add a new commit if review comments are fixed. If added a new commit to PR , make sure before pushing final PR squash them. Else ammend and force push the commit. That way exisiting comments will not wash away |
Hey yes, this is a new pr and the link to last one has been mentioned above, I'll attach the latest result for failed scenario |
OSS Scan Results:
Total issues: 0 |
License Evaluation Results:
Total License Issues: 19 |
if err != nil { | ||
logrus.Infof("Error fetching description of job-pod[%s] :%v", pod.Name, err) | ||
} | ||
logrus.Infof("start of job-pod[%s]'s description", pod.Name) |
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.
add some space between job-pod and pod name
logrus.Infof("Error fetching description of job-pod[%s] :%v", pod.Name, err) | ||
} | ||
logrus.Infof("start of job-pod[%s]'s description", pod.Name) | ||
logrus.Infof("Describe%v", podDescribe) |
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.
you dont need any word like Describe please delete it.
@@ -507,7 +507,7 @@ func appendPodLogToStork(jobName string, namespace string) { | |||
// Get job and check whether it has live pod attaced to it | |||
job, err := batch.Instance().GetJob(jobName, namespace) | |||
if err != nil && !k8sErrors.IsNotFound(err) { | |||
logrus.Infof("failed in getting job %v/%v with err: %v", namespace, jobName, err) | |||
logrus.Infof("failed in getting job %v/%v with err: %v and reason: %v", namespace, jobName, err, job.Status.Conditions[0].Reason) |
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.
Othertahn Notfound error is there a chnace the Job pointer will be returned with Nil value, In that case it can panic.. Please cross check .
OSS Scan Results:
Total issues: 0 |
License Evaluation Results:
Total License Issues: 19 |
Pb-4396 Added code to send Pod's describe output even if PodLog is being sent Pb-4396 Updated code to send Pod's describe output even if PodLog is being sent Pb-4396 Updated code to send Pod's describe output even if PodLog is being sent
00bf19a
to
2f7f3a7
Compare
OSS Scan Results:
Total issues: 0 |
License Evaluation Results:
Total License Issues: 19 |
What this PR does / why we need it:
Capture job's and pod's describe output in case of failure.
Which issue(s) this PR fixes (optional)
Closes #309 https://portworx.atlassian.net/browse/PB-4396
Special notes for your reviewer:
Simulated a pod failure by giving wrong command to run inside the container which exits with non-zero status code
Checked the log for the leader stork pod while triggering a live backup