client: re-expand admin_socket metavariables in child process
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: starting ceph client ceph-fuse: 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.
#4 Updated by Patrick Donnelly over 1 year 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 (