diff --git a/extern/sector-storage/worker_local.go b/extern/sector-storage/worker_local.go index a5f5a0b9d..0eb8bd9a6 100644 --- a/extern/sector-storage/worker_local.go +++ b/extern/sector-storage/worker_local.go @@ -102,7 +102,13 @@ func newLocalWorker(executor ExecutorFunc, wcfg WorkerConfig, envLookup EnvFunc, go func() { for _, call := range unfinished { - err := storiface.Err(storiface.ErrTempWorkerRestart, xerrors.New("worker restarted")) + hostname, osErr := os.Hostname() + if osErr != nil { + log.Errorf("get hostname err: %+v", err) + hostname = "" + } + + err := storiface.Err(storiface.ErrTempWorkerRestart, xerrors.Errorf("worker [Hostname: %s] restarted", hostname)) // TODO: Handle restarting PC1 once support is merged @@ -261,6 +267,15 @@ func (l *LocalWorker) asyncCall(ctx context.Context, sector storage.SectorRef, r } } + if err != nil { + hostname, osErr := os.Hostname() + if osErr != nil { + log.Errorf("get hostname err: %+v", err) + } + + err = xerrors.Errorf("%s [Hostname: %s]", err.Error(), hostname) + } + if doReturn(ctx, rt, ci, l.ret, res, toCallError(err)) { if err := l.ct.onReturned(ci); err != nil { log.Errorf("tracking call (done): %+v", err)