mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-17 20:57:27 +00:00
ci: fix FUSE mounts against the new runner image (#10484)
* ci: restore the setuid bit on a shadowed fusermount3 Newer ubuntu-22.04 runner images carry a source-built fusermount3 in /usr/local/bin that shadows the distro one in PATH and is not setuid root. go-fuse looks the helper up through PATH, so every unprivileged mount fails with "mount failed: Operation not permitted". * test: fail a fuse test as soon as its mount process dies A mount that cannot mount at all exits within a second, but the harness still waited out the 30s readiness timeout and then reported "mount point not ready within timeout", leaving the real cause buried in the log tail. Watch the child processes and report their exit instead. * mount: report a failed mount without a goroutine dump A mount failure is an environment problem - no /dev/fuse, fusermount not setuid, stale mount point - and the all-goroutine stack dump Fatalf adds buries the one line that says so.
This commit is contained in:
@@ -44,6 +44,18 @@ jobs:
|
||||
sudo apt-get install -y libfuse3-dev
|
||||
echo 'user_allow_other' | sudo tee -a /etc/fuse.conf
|
||||
sudo chmod 644 /etc/fuse.conf
|
||||
# Some runner images carry a second, source-built fusermount3 in
|
||||
# /usr/local/bin that shadows the distro one in PATH without its setuid
|
||||
# bit, and every unprivileged mount then fails with EPERM. go-fuse takes
|
||||
# the first fusermount3 in PATH, so repair that one.
|
||||
fusermount_bin=$(command -v fusermount3 || true)
|
||||
if [ -n "$fusermount_bin" ]; then
|
||||
if [ ! -u "$fusermount_bin" ]; then
|
||||
sudo chown root:root "$fusermount_bin"
|
||||
sudo chmod u+s "$fusermount_bin"
|
||||
fi
|
||||
ls -l "$fusermount_bin"
|
||||
fi
|
||||
|
||||
- name: Build SeaweedFS
|
||||
run: go build -o weed/weed -buildvcs=false ./weed
|
||||
|
||||
@@ -45,6 +45,18 @@ jobs:
|
||||
# Allow non-root FUSE mounts with allow_other
|
||||
echo 'user_allow_other' | sudo tee -a /etc/fuse.conf
|
||||
sudo chmod 644 /etc/fuse.conf
|
||||
# Some runner images carry a second, source-built fusermount3 in
|
||||
# /usr/local/bin that shadows the distro one in PATH without its setuid
|
||||
# bit, and every unprivileged mount then fails with EPERM. go-fuse takes
|
||||
# the first fusermount3 in PATH, so repair that one.
|
||||
fusermount_bin=$(command -v fusermount3 || true)
|
||||
if [ -n "$fusermount_bin" ]; then
|
||||
if [ ! -u "$fusermount_bin" ]; then
|
||||
sudo chown root:root "$fusermount_bin"
|
||||
sudo chmod u+s "$fusermount_bin"
|
||||
fi
|
||||
ls -l "$fusermount_bin"
|
||||
fi
|
||||
# Verify FUSE installation
|
||||
fusermount3 --version || fusermount --version || true
|
||||
ls -la /dev/fuse
|
||||
|
||||
@@ -50,6 +50,18 @@ jobs:
|
||||
sudo apt-get install -y libfuse3-dev
|
||||
echo 'user_allow_other' | sudo tee -a /etc/fuse.conf
|
||||
sudo chmod 644 /etc/fuse.conf
|
||||
# Some runner images carry a second, source-built fusermount3 in
|
||||
# /usr/local/bin that shadows the distro one in PATH without its setuid
|
||||
# bit, and every unprivileged mount then fails with EPERM. go-fuse takes
|
||||
# the first fusermount3 in PATH, so repair that one.
|
||||
fusermount_bin=$(command -v fusermount3 || true)
|
||||
if [ -n "$fusermount_bin" ]; then
|
||||
if [ ! -u "$fusermount_bin" ]; then
|
||||
sudo chown root:root "$fusermount_bin"
|
||||
sudo chmod u+s "$fusermount_bin"
|
||||
fi
|
||||
ls -l "$fusermount_bin"
|
||||
fi
|
||||
|
||||
- name: Build SeaweedFS
|
||||
run: go build -o weed/weed -buildvcs=false ./weed
|
||||
|
||||
Reference in New Issue
Block a user