Skip to content

blobfuse2 returns with success (exit 0) before filesystem mount is complete when started through autofs #2121

@fsorenson

Description

@fsorenson

When autofs initiates a mount, blobfuse2 reports an error:

blobfuse2[408325] : [1][/mnt/blobfuse2/storage1] LOG_DEBUG [utils.go (168)]: SDK(Retry) : response 200
blobfuse2[408325] : [1][/mnt/blobfuse2/storage1] LOG_DEBUG [utils.go (168)]: SDK(Retry) : exit due to non-retriable status code
blobfuse2[408325] : [1][/mnt/blobfuse2/storage1] LOG_INFO [mount.go (509)]: mount: Mounting blobfuse2 on /mnt/blobfuse2/storage1
blobfuse2[408325] : [1][/mnt/blobfuse2/storage1] LOG_ERR [mount.go (547)]: mount : failed to daemonize application [daemon: Resource temporarily unavailable], trying auto cleanup
blobfuse2[408325] : [1][/mnt/blobfuse2/storage1] LOG_DEBUG [mount.go (556)]: mount: foreground disabled, child = false

It then exits with success (0), but another thread continues to execute.

autofs interprets the exit code 0 as a successful mount.

However, since since blobfuse2 hasn't completed the mount yet, autofs is again triggered to start another mount.

After just shy of 22 seconds, there are 3-4 blobfuse2 processes executing, and the filesystem is mounted 3-4 times.

At this point, the mount works fine.

What is needed to fix the 'failed to daemonize application', eliminate the early exit before the filesystem is ready, and cut the mount time?

autofs configuration:
/etc/auto.master:
/mnt/blobfuse2 /etc/auto.blobfuse2 --timeout=60

/etc/auto.blobfuse2:
storage1 -fstype=fuse :blobfuse2\#--config-file=/etc/blobfuse2_config.yaml

# systemctl restart autofs

# time cat /mnt/blobfuse2/storage1/testfile
testfile
real 0m21.837s
user 0m0.000s
sys 0m0.003s

blobfuse2 is latest git, system is Red Hat Enterprise Linux 9 with latest available autofs

attaching config file and logfile containing blobfuse2 trace and autofs messages

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions