Skip to content

Commit

Permalink
Fix #107 - Wait for mount if the process is already started by systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Apr 22, 2024
1 parent 29e63f2 commit b6e93a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/mounter/geesefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ func (geesefs *geesefsMounter) Mount(target, volumeID string) error {
volumeID, target, curPath,
)
}
// Already mounted at right location
return nil
// Already mounted at right location, wait for mount
return waitForMount(target, 30*time.Second)
} else {
// Stop and garbage collect the unit if automatic collection didn't work for some reason
conn.StopUnit(unitName, "replace", nil)
Expand All @@ -211,5 +211,5 @@ func (geesefs *geesefsMounter) Mount(target, volumeID string) error {
if err != nil {
return fmt.Errorf("Error starting systemd unit %s on host: %v", unitName, err)
}
return waitForMount(target, 10*time.Second)
return waitForMount(target, 30*time.Second)
}

0 comments on commit b6e93a8

Please sign in to comment.