Bug #21848
closedclient: re-expand admin_socket metavariables in child process
0%
Description
The default value of admin_socket is $run_dir/$cluster-$name.asok. If mounting multiple ceph-fuse instances on the same host with the same entity id, all can be mounted successfully but admin socket will fail as follows.
2017-10-19 14:59:00.631443 7ff6b3999040 -1 asok(0x7ff6bdda8380) AdminSocketConfigObs::init: failed: AdminSocket::bind_and_listen: failed to bind the UNIX domain socket to '/var/run/ceph/ceph-client.admin.asok': (17) File exists
Then we configure admin_socket to $run_dir/$cluster-$name-$pid.asok in ceph.conf file to avoid above failure. It works but the value of $pid is not the final ceph-fuse process id. The value is the parent process id which will exit quickly. So it is still difficult to identify which asok file belongs to which ceph-fuse instance.
$ sudo ceph-fuse /mnt/ceph-fuse/ 2017-10-19 15:00:08.005618 7efe6c2dd040 -1 init, newargv = 0x7efe76052760 newargc=9 ceph-fuse[89487]: starting ceph client ceph-fuse[89487]: starting fuse $ ls -l /var/run/ceph/ceph-client.admin-89485.asok srwxr-xr-x 1 root root 0 Oct 19 15:00 /var/run/ceph/ceph-client.admin-89485.asok
The reason is that all the option's metavariables are expanded early, especially in ceph-fuse case, they are expended in parent process however ceph-fuse is started in child process. So we try to re-expand admin_socket metavariables in child process if it is defined in conf file.
Updated by Nathan Cutler over 6 years ago
- Status changed from New to Fix Under Review
Updated by Patrick Donnelly over 6 years ago
- Status changed from Fix Under Review to In Progress
- Assignee set to Zhi Zhang
- Backport set to luminous
Zhi, please revisit this issue as the fix in https://github.com/ceph/ceph/pull/18393 must be reverted due to the reasons trociny outlined.
Updated by Patrick Donnelly about 6 years ago
- Subject changed from ceph-fuse: re-expand admin_socket metavariables in child process to client: re-expand admin_socket metavariables in child process
- Category set to Administration/Usability
- Target version set to v14.0.0
- Backport changed from luminous to luminous,mimic
- Component(FS) Client added
- Component(FS) deleted (
ceph-fuse)
Updated by Zhi Zhang about 6 years ago
Hi Patrick,
Sorry for missing this for a long time. I will take a look recently to see whether there is a better fixing way.
Updated by Zhi Zhang about 6 years ago
https://github.com/ceph/ceph/pull/21544
Patrick, could you pls take a look at this new fix? Now it is not only for admin_socket, but also for those options containing $pid. Thanks.
Updated by Patrick Donnelly about 6 years ago
- Status changed from In Progress to Fix Under Review
- Target version changed from v14.0.0 to v13.0.0
- Backport changed from luminous,mimic to luminous
- Component(FS) ceph-fuse added
- Component(FS) deleted (
Client)
Updated by Patrick Donnelly about 6 years ago
- Priority changed from Normal to High
- Target version changed from v13.0.0 to v14.0.0
- Backport changed from luminous to luminous,mimic
Updated by Patrick Donnelly almost 6 years ago
- Status changed from Fix Under Review to Resolved
- Backport deleted (
luminous,mimic)