Skip to content

Commit

Permalink
Add log of kube pod status on error (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronH88 authored Jul 31, 2024
1 parent 89bd57b commit 24d8a6c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/workceptor/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ func (kw *KubeUnit) runWorkUsingLogger() {
// this is probably not possible...
errMsg := fmt.Sprintf("Error reading stdin: %s", stdin.Error())
kw.GetWorkceptor().nc.GetLogger().Error(errMsg)
kw.GetWorkceptor().nc.GetLogger().Error("Pod status at time of error %s", kw.pod.Status.String())
kw.UpdateBasicStatus(WorkStateFailed, errMsg, stdout.Size())

close(stdinErrChan) // signal STDOUT goroutine to stop
Expand Down

0 comments on commit 24d8a6c

Please sign in to comment.