project-machine / puzzlefs

Apache License 2.0
380 stars 18 forks source link

Missing error message + hang when mounting in background #66

Closed ariel-miculas closed 1 year ago

ariel-miculas commented 1 year ago

Remove allow_other from /etc/fuse.conf.

Foreground:

$ target/debug/puzzlefs mount -o allow_other -f /tmp/oci-simple first_try /tmp/puzzle
[2023-02-10T08:48:37Z INFO  fuser::session] Mounting /tmp/puzzle
Error: fs error: fusermount3: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf

Caused by:
    fusermount3: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf

Background:

$ target/debug/puzzlefs mount -o allow_other /tmp/oci-simple first_try /tmp/puzzle

The command just hangs, there are no relevant messages in journalctl.

ariel-miculas commented 1 year ago

This was introduced by https://github.com/anuvu/puzzlefs/pull/64/commits/3bfb0eea1d9c4b330c5171dda7030ca9d9b68afe

ariel-miculas commented 1 year ago

In foreground mode, if mount fails, then the following script gets stuck:

#!/bin/bash
FIFO=$(mktemp -u)
mkfifo "$FIFO"
target/debug/puzzlefs mount -i $FIFO -f /tmp/oci-simple first_try /tmp/puzzle&
cat $FIFO
ls /tmp/puzzle

These two issues have the same root cause: nobody writes to the pipe in case of failure