Hack for noocache works use it only when the option is used
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-10-03 19:24:22 +02:00
parent 6dc5992f81
commit 5448555b8f

View File

@@ -32,6 +32,7 @@ import (
"github.com/boltdb/bolt"
"github.com/docker/go-plugins-helpers/volume"
log "github.com/sirupsen/logrus"
"golang.org/x/exp/slices"
)
type ofsVolume struct {
@@ -411,7 +412,7 @@ func (d *ofsDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
// mount.objectivefs process and the mount forever stays in startup state returning "Input/output error"
// for any filesystem interaction from us or other tools.
// HACK: Due to the bug we just wait a safe interval
if i == 0 {
if i == 0 && slices.Contains(v.Opts, "noocache") {
time.Sleep(1000 * time.Millisecond)
}
if isObjfs, err := isObjectiveFsMount(mountPath); err == nil && isObjfs {