Project

General

Profile

Bug #21848

client: re-expand admin_socket metavariables in child process

Added by Zhi Zhang about 1 year ago. Updated 6 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Administration/Usability
Target version:
Start date:
10/19/2017
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
ceph-fuse
Labels (FS):
Pull request ID:

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.

History

#2 Updated by Nathan Cutler about 1 year ago

  • Status changed from New to Need Review

#3 Updated by Patrick Donnelly about 1 year ago

  • Status changed from Need 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.

#4 Updated by Patrick Donnelly 8 months 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)

#5 Updated by Zhi Zhang 8 months 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.

#6 Updated by Zhi Zhang 8 months 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.

#7 Updated by Patrick Donnelly 8 months ago

  • Status changed from In Progress to Need 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)

#8 Updated by Patrick Donnelly 7 months 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

#9 Updated by Patrick Donnelly 6 months ago

  • Status changed from Need Review to Resolved
  • Backport deleted (luminous,mimic)

Also available in: Atom PDF