projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'main' into 18842-arv-mount-disk-config
[arvados.git]
/
lib
/
crunchrun
/
crunchrun.go
diff --git
a/lib/crunchrun/crunchrun.go
b/lib/crunchrun/crunchrun.go
index 7d57d732de4f0d0621caec8b32ace537ff421e78..51e154c0ecfb3b978844947480f1efe7fe2f6fa9 100644
(file)
--- a/
lib/crunchrun/crunchrun.go
+++ b/
lib/crunchrun/crunchrun.go
@@
-142,6
+142,7
@@
type ContainerRunner struct {
parentTemp string
costStartTime time.Time
parentTemp string
costStartTime time.Time
+ keepstore *exec.Cmd
keepstoreLogger io.WriteCloser
keepstoreLogbuf *bufThenWrite
statLogger io.WriteCloser
keepstoreLogger io.WriteCloser
keepstoreLogbuf *bufThenWrite
statLogger io.WriteCloser
@@
-666,6
+667,9
@@
func (runner *ContainerRunner) SetupMounts() (map[string]bindmount, error) {
if err != nil {
return nil, fmt.Errorf("while trying to start arv-mount: %v", err)
}
if err != nil {
return nil, fmt.Errorf("while trying to start arv-mount: %v", err)
}
+ if runner.hoststatReporter != nil && runner.ArvMount != nil {
+ runner.hoststatReporter.ReportPID("arv-mount", runner.ArvMount.Process.Pid)
+ }
for _, p := range collectionPaths {
_, err = os.Stat(p)
for _, p := range collectionPaths {
_, err = os.Stat(p)
@@
-739,6
+743,7
@@
func (runner *ContainerRunner) startHoststat() error {
PollPeriod: runner.statInterval,
}
runner.hoststatReporter.Start()
PollPeriod: runner.statInterval,
}
runner.hoststatReporter.Start()
+ runner.hoststatReporter.ReportPID("crunch-run", os.Getpid())
return nil
}
return nil
}
@@
-1575,6
+1580,9
@@
func (runner *ContainerRunner) Run() (err error) {
if err != nil {
return
}
if err != nil {
return
}
+ if runner.keepstore != nil {
+ runner.hoststatReporter.ReportPID("keepstore", runner.keepstore.Process.Pid)
+ }
// set up FUSE mount and binds
bindmounts, err = runner.SetupMounts()
// set up FUSE mount and binds
bindmounts, err = runner.SetupMounts()
@@
-1859,6
+1867,7
@@
func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
return 1
}
return 1
}
+ cr.keepstore = keepstore
if keepstore == nil {
// Log explanation (if any) for why we're not running
// a local keepstore.
if keepstore == nil {
// Log explanation (if any) for why we're not running
// a local keepstore.