osbuild-worker: print stacktrace in case osbuild job panics
This commit is contained in:
parent
4df04643ab
commit
a769d73745
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
|
|
@ -373,6 +374,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
|||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logWithId.Errorf("Recovered from panic: %v", r)
|
||||
logWithId.Errorf("%s", debug.Stack())
|
||||
|
||||
osbuildJobResult.JobError = clienterrors.WorkerClientError(
|
||||
clienterrors.ErrorJobPanicked,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue