]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-conf: fix client's admin socket parsing 37785/head
authorXiubo Li <xiubli@redhat.com>
Wed, 25 Nov 2020 05:54:04 +0000 (13:54 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 9 Dec 2020 11:36:24 +0000 (19:36 +0800)
commit1f09b196657d21cec8fca9bc868bae307200aae8
tree0c1e5ee4991a3d7c4eb2bc65bba1af863eb8df89
parent43c7c622ef227f087e33504364ec503a9d68ac62
ceph-conf: fix client's admin socket parsing

For the 'admin socket' in ceph.conf, if the "$pid" is specified, it
will be expanded with the current process's PID.

For the ceph-conf command, if we specify the "--name" with a value
that have contained a socket daemon's PID, likes:

$ ceph-conf --name client.admin.133423 --show-config-value admin_socket

It will return a sockpath like:

/tmp/user/1000/ceph-asok.EZQumU/client.admin.133423.324523.asok

But the following is expected:

/tmp/user/1000/ceph-asok.EZQumU/client.admin.133423.asok

Stick "$name.$id" for mon/osd/mds/mgr daemons and for other try to
tripe the "$pid" from the name option's value and set a "PID" env.

Fixes: https://tracker.ceph.com/issues/47977
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/config.cc
src/test/cli/ceph-conf/show-config-value.t
src/tools/ceph_conf.cc