Project

General

Profile

Actions

Bug #23421

closed

ceph-fuse: stop ceph-fuse if no root permissions?

Added by Jos Collin about 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
ceph-fuse
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I think it would be a good idea to prevent ceph-fuse from proceeding if there are no appropriate permissions.
I request someone to validate the following:

Create mountpoint with non-root ownership

[jcollin@stratocaster build]$ ll /mnt/
total 0
drwxr-xr-x. 2 jcollin jcollin 6 Mar 20 09:26 cephfs
drwxr-xr-x. 2 jcollin jcollin 6 Mar 20 08:52 myfs

Mount without sudo

[jcollin@stratocaster build]$ ./bin/ceph-fuse -m localhost:40548 /mnt/cephfs/
2018-03-20 09:40:17.649 7f4d07710cc0 -1 WARNING: all dangerous and experimental features are enabled.
2018-03-20 09:40:17.674 7f4d07710cc0 -1 WARNING: all dangerous and experimental features are enabled.
2018-03-20 09:40:17.696 7f4d07710cc0 -1 WARNING: all dangerous and experimental features are enabled.
2018-03-20 09:40:17.697 7f4d07710cc0 -1 init, newargv = 0x560b647003c0 newargc=7
ceph-fuse[7058]: starting ceph client
ceph-fuse[7058]: starting fuse

df, ls /mnt/ hangs for around 15 minutes

[jcollin@stratocaster build]$ df
^C
[jcollin@stratocaster build]$ ls /mnt/
^C

Later on, found that ceph-fuse hangs.

[jcollin@stratocaster build]$ ps -A | grep ceph-fuse
 7058 pts/0    00:00:00 ceph-fuse

So Kill ceph-fuse

[jcollin@stratocaster build]$ sudo kill -9 7058

Now everything seems back to normal. But see the output of the list and df now.

[jcollin@stratocaster build]$ df
df: /mnt/cephfs: Transport endpoint is not connected
Filesystem              1K-blocks     Used Available Use% Mounted on
devtmpfs                  9964244        0   9964244   0% /dev
tmpfs                     9978944        0   9978944   0% /dev/shm
tmpfs                     9978944     1524   9977420   1% /run
tmpfs                     9978944        0   9978944   0% /sys/fs/cgroup
/dev/mapper/fedora-root  52403200 19414508  32988692  38% /
tmpfs                     9978944     4952   9973992   1% /tmp
/dev/sda1                  999320   201264    729244  22% /boot
/dev/mapper/fedora-home 436358992 87335312 349023680  21% /home
tmpfs                     1995788       16   1995772   1% /run/user/1000

[jcollin@stratocaster build]$ ll /mnt/
ls: cannot access '/mnt/cephfs': Transport endpoint is not connected
total 0
d?????????? ? ?       ?       ?            ? cephfs
drwxr-xr-x. 2 jcollin jcollin 6 Mar 20 08:52 myfs

[root@stratocaster build]# rmdir /mnt/cephfs
rmdir: failed to remove '/mnt/cephfs': Device or resource busy
[root@stratocaster build]# rm -Rf /mnt/cephfs 
rm: cannot remove '/mnt/cephfs': Is a directory

This requires a reboot to become normal. This problem doesn't happen if we mounted with 'sudo' in the above step.


Files

client.admin.269603.log (31 KB) client.admin.269603.log crash Jos Collin, 06/19/2020 09:26 AM
Actions

Also available in: Atom PDF