Handle mount process crash gracefully.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-27 00:25:01 +02:00
parent 081d0e82df
commit c9c2115e83

View File

@@ -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())