Skip to content
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

mds: set ceph-mds name uncond for external tools #14021

Merged
merged 1 commit into from Mar 28, 2017

Conversation

Projects
None yet
2 participants
@batrick
Copy link
Member

batrick commented Mar 17, 2017

External tools like logrotate which use killall rely on the "ceph-mds" name to
find it in /proc/*/comm. This is normally the case but when ceph-mds respawns
using /proc/self/exe (on Linux), its name will change to "exe". This makes
logrotate fail to signal ceph-mds the log needs to be reopened and will lead to
the log growing until the disk is full.

This patch unconditionally sets the name so on respawn the name is correct (and
in any other possible scenario, such as a misnamed executable). Note, there is
still a very small race between execve and ceph_pthread_setname where the
process name is wrong.

Problem was introduced by 66a1220.

Fixes: http://tracker.ceph.com/issues/19291

Signed-off-by: Patrick Donnelly pdonnell@redhat.com

mds: set ceph-mds name uncond for external tools
External tools like logrotate which use killall rely on the "ceph-mds" name to
find it in /proc/*/comm. This is normally the case but when ceph-mds respawns
using /proc/self/exe (on Linux), its name will change to "exe". This makes
logrotate fail to signal ceph-mds the log needs to be reopened and will lead to
the log growing until the disk is full.

This patch unconditionally sets the name so on respawn the name is correct (and
in any other possible scenario, such as a misnamed executable).  Note, there is
still a very small race between execve and ceph_pthread_setname where the
process name is wrong.

Problem was introduced by 66a1220.

Fixes: http://tracker.ceph.com/issues/19291

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@batrick

This comment has been minimized.

Copy link
Member Author

batrick commented Mar 17, 2017

Tested with my Linode experiments.

@jcsp

jcsp approved these changes Mar 21, 2017

@jcsp jcsp merged commit af3b8ed into ceph:master Mar 28, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@batrick batrick deleted the batrick:i19291 branch Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.