Still hangs on mount
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-26 14:39:25 +02:00
parent a09eb5ee55
commit 2b5e0a0c6c

View File

@@ -190,11 +190,12 @@ func (d ofsDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
if err := cmd.Start(); err != nil {
return &volume.MountResponse{}, fmt.Errorf("unexpected error mounting '%s' error: %s", r.Name, err.Error())
}
log.WithFields(log.Fields{"name": r.Name}).Info("Process started")
log.WithFields(log.Fields{"name": r.Name}).Info("Process starting")
// The drawback of running the mount in the foreground is there is no way to tell if it failed
// to initially connect. So we just wait a fixed amount of time and check for process exit.
time.Sleep(1 * time.Second)
log.WithFields(log.Fields{"name": r.Name}).Info("Process started")
if cmd.ProcessState.Exited() {
log.WithFields(log.Fields{"name": r.Name, "exitStatus": cmd.ProcessState.ExitCode()}).Error("Volume mount failed")
return &volume.MountResponse{}, fmt.Errorf("unexpected error mounting '%s' exist status: %v", r.Name, cmd.ProcessState.ExitCode())