]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph.in: try harder if asok path does not exist 38599/head
authorKefu Chai <kchai@redhat.com>
Tue, 15 Dec 2020 15:11:47 +0000 (23:11 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 17 Dec 2020 00:54:44 +0000 (08:54 +0800)
commitc826b0338302d3728523ed88e9bde1550ad1525a
treef7158884047779515ed31d6b08c5c3714c613f16
parentc17c6c66ebadf14cf7c632ab55dffafc620b9ff2
ceph.in: try harder if asok path does not exist

when handling "ceph daemon <name> ...", we need to figure out the asok
path, if the "<name>" option is not a path but a "name" as it claims to
be. but if the "admin_socket" option includes substitution/meta variable of
"$pid", it will be expanded using its own pid, instead of the process
with the specified "name". but "ceph" cli does not offer a dedicated
option for overriding the pid for ceph-conf which is used "ceph" cli to
retrieve the "admin_socket" option with specified "name".

in this change, "<name>" option is interpreted as "${name}.${pid}" if
the returned admin_socket path does not point to a valid UNIX domain
socket file. and "ceph" cli will try harder by passing "--pid ${pid}"
and "--name ${name}" instead of "--name ${name}.${pid}" to ceph-conf.

Fixes: https://tracker.ceph.com/issues/47977
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph.in