New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceph_context: re-expand admin_socket metavariables in child process #18393
Conversation
retest this please. |
it's a general problem for all ceph daemons. is it possible to fix problem completely? |
Reset admin_socket raw value if it is defined in conffile. Just in case it used metavarirables (e.g, $pid) which could be expanded again to the correct value in child process. Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
9fcff4a
to
1630f4b
Compare
@ukernel I checked again on ceph-mon, ceph-osd, ceph-mds, ceph-mgr and ceph-fuse daemons. Except ceph-fuse, other daemons don't have this problem right now. But if a daemon is started in a child process and the value of its "daemonize" option is true, this problem would happen. So once for all, I moved the fix into ceph_context just before creating admin_socket. Please review the new changes, thanks. |
* refs/pull/18393/head: ceph_context: re-expand admin_socket metavariables in child process Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This change introduces a regression: admin-socket, specified via command line or CEPH_ARGS env does not work:
E.g. this test fails now: qa/workunits/rbd/test_admin_socket.sh |
I mean, if you have admin-socket specified both in ceph.conf and via command line (or env), it will use ceph.conf setting instead of command line override. |
Another thing that I don't like very much about this solution is that it tries to fix only "admin-socket" config option, while $pid can be useful in other options too (e.g. log-file). |
Reset admin_socket raw value if it is defined in conf file. Just in case it used metavarirables (e.g, $pid) which could be expanded again to the correct value in child process.
Fixes: #http://tracker.ceph.com/issues/21848
Signed-off-by: Zhi Zhang zhangz.david@outlook.com