Project

General

Profile

Actions

Bug #8324

closed

pid files are not created

Added by Mike Dawson almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
documentation
Target version:
-
% Done:

100%

Source:
Community (user)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

In Firefly (and I believe Emperor, too) PID files are not created in /var/run/ceph. This used to work in Dumpling.

ls /var/run/ceph
total 0
drwxr-xr-x 2 root root 100 May 9 19:46 .
drwxr-xr-x 22 root root 860 May 9 19:12 ..
srwxr-xr-x 1 root root 0 May 9 19:46 ceph-mon.node1.asok
srwxr-xr-x 1 root root 0 May 9 19:46 ceph-osd.0.asok
srwxr-xr-x 1 root root 0 May 9 19:46 ceph-osd.1.asok

ceph daemon mon.node1 config show | grep pid_file
"pid_file": "",

So it appears pid_file isn't properly being set. The docs [0] say it should default to /var/run/$cluster/$name.pid. Manually setting the pid_file location under [general], [mon], or [mon.node1] fail as well, even when metavariable substitution is not used. Affects OSDs, too.

[0]: https://ceph.com/docs/master/rados/configuration/general-config-ref/

Actions #1

Updated by Sage Weil almost 10 years ago

  • Priority changed from Normal to High
Actions #2

Updated by Loïc Dachary almost 10 years ago

  • Assignee set to Loïc Dachary
Actions #3

Updated by Loïc Dachary almost 10 years ago

  • Category set to common
  • Status changed from New to In Progress
  • % Done changed from 0 to 50

The default for pid_file in firefly is indeed the empty string. However, if set in /etc/ceph/ceph.conf to

pid_file = /var/run/ceph/$type.$id.pid

it will be reported correctly with
# ceph-mon -i bm0402 --show-config | grep pid_file
pid_file = /var/run/ceph/mon.bm0402.pid

but not with
# ceph daemon mon.bm0402 config show | grep pid_file
  "pid_file": "",

because it queries the local daemon instead of looking up the configuration file (this is normal, not a bug, as explained in the paragraph below).

When ceph-mon runs from upstart as /usr/bin/ceph-mon --cluster=ceph -i bm0402 -f the -f flag will not daemonize the process. The pid_file configuration string is reset to the empty string because CODE_ENVIRONMENT_DAEMON is not set. Since it is not daemonized, it will not even try to create the pidfile

However, if run manually, it will create the pidfile as expected:

# /usr/bin/ceph-mon --cluster=ceph -i bm0402 
root@bm0402:~# ls -l  /var/run/ceph
total 4
srwxr-xr-x 1 root root 0 May 25 02:01 ceph-mon.bm0402.asok
srwxr-xr-x 1 root root 0 May 23 17:41 ceph-osd.0.asok
-rw-r--r-- 1 root root 5 May 25 02:01 mon.bm0402.pid

Actions #4

Updated by Loïc Dachary almost 10 years ago

  • Category changed from common to documentation
  • Status changed from In Progress to Fix Under Review
  • % Done changed from 50 to 100
Actions #5

Updated by Loïc Dachary almost 10 years ago

  • % Done changed from 100 to 90
Actions #6

Updated by Loïc Dachary almost 10 years ago

  • Status changed from Fix Under Review to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF