forked from Ivasoft/objectivefs-docker-volume
Handle mount process crash gracefully.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
4
main.go
4
main.go
@@ -265,6 +265,10 @@ func (d *ofsDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
|
||||
}
|
||||
cmd.Wait()
|
||||
log.WithFields(log.Fields{"name": r.Name}).Info("Completed mount process")
|
||||
|
||||
// In case the mount stopped in unplanned fashion allow easy re-mount
|
||||
rt.mounted = false
|
||||
rt.use = make(map[string]bool)
|
||||
}()
|
||||
if err := cmd.Start(); err != nil {
|
||||
return &volume.MountResponse{}, fmt.Errorf("unexpected error mounting '%s' error: %s", r.Name, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user