Project

General

Profile

Actions

Bug #21848

closed

client: re-expand admin_socket metavariables in child process

Added by Zhi Zhang over 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Administration/Usability
Target version:
% 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:
Crash signature (v1):
Crash signature (v2):

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.

Actions #2

Updated by Nathan Cutler over 6 years ago

  • Status changed from New to Fix Under Review
Actions #3

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.

Actions #4

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)
Actions #5

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.

Actions #6

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.

Actions #7

Updated by Patrick Donnelly almost 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)
Actions #8

Updated by Patrick Donnelly almost 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
Actions #9

Updated by Patrick Donnelly almost 6 years ago

  • Status changed from Fix Under Review to Resolved
  • Backport deleted (luminous,mimic)
Actions

Also available in: Atom PDF