daemon: provide os.Environ() in zrepl status

Useful for debugging.

fixes https://github.com/zrepl/zrepl/issues/534
This commit is contained in:
Christian Schwarz 2021-11-10 18:43:08 +01:00
parent cf5e8e8f26
commit c2fbf93365
2 changed files with 7 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import (
"io"
"net"
"net/http"
"os"
"time"
"github.com/pkg/errors"
@ -124,8 +125,9 @@ func (j *controlJob) Run(ctx context.Context) {
s := Status{
Jobs: jobs,
Global: GlobalStatus{
ZFSCmds: globalZFS,
Envconst: envconstReport,
ZFSCmds: globalZFS,
Envconst: envconstReport,
OsEnviron: os.Environ(),
}}
return s, nil
}})

View File

@ -160,8 +160,9 @@ type Status struct {
}
type GlobalStatus struct {
ZFSCmds *zfscmd.Report
Envconst *envconst.Report
ZFSCmds *zfscmd.Report
Envconst *envconst.Report
OsEnviron []string
}
func (s *jobs) status() map[string]*job.Status {