Project

General

Profile

Bug #13474

Ceph daemon failed to start, because the service name was already used.

Added by chuanhong wang about 7 years ago. Updated almost 7 years ago.

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

0%

Source:
other
Tags:
Backport:
hammer,infernalis
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Sometimes, ceph daemon cant't be started up, because the service name which allocated by systemd-run was alread used. For details, please find the log below.
It seemd that the service name include a prefix, like 'run-', and a process id. If a process exited, its id will be reused, and result in conflicts of service name.

[root@ceph6 ~]#service ceph restart 
Running as unit run-9539.service.
=== osd.14 === 
=== osd.14 === 
Stopping Ceph osd.14 on ceph104...kill 14943...kill 14943...done
=== osd.14 === 
libust[10508/10508]: Warning: HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:375)
create-or-move updated item name 'osd.14' weight 0.27 at location {host=ceph104,root=default} to crush map
Starting Ceph osd.14 on ceph104...
Running as unit run-10551.service.
Failed start transient unit: Unit run-10551.service already exists.
failed: 'systemd-run -r bash -c 'ulimit -n 32768; ulimit -c unlimited; cgexec -g cpuset,memory:osd /usr/bin/ceph-osd -i 14 --pid-file /var/run/ceph/osd.14.pid -c /etc/ceph/ceph.conf --cluster ceph -f''

Related issues

Copied to Ceph - Backport #13935: infernalis: Ceph daemon failed to start, because the service name was already used. Resolved
Copied to Ceph - Backport #13936: hammer: Ceph daemon failed to start, because the service name was already used. Resolved

Associated revisions

Revision 2f36909e (diff)
Added by wangchaunhong about 7 years ago

init-ceph: fix systemd-run cant't start ceph daemon sometimes

Fixes: #13474
Signed-off-by: Chuanhong Wang <>

Revision 53e81aab (diff)
Added by wangchaunhong almost 7 years ago

init-ceph: fix systemd-run cant't start ceph daemon sometimes

Fixes: #13474
Signed-off-by: Chuanhong Wang <>
(cherry picked from commit 2f36909e1e08bac993e77d1781a777b386335669)

Conflicts:
src/init-ceph.in
different content of cmd variable

Revision c968a40d (diff)
Added by wangchaunhong almost 7 years ago

init-ceph: fix systemd-run cant't start ceph daemon sometimes

Fixes: #13474
Signed-off-by: Chuanhong Wang <>
(cherry picked from commit 2f36909e1e08bac993e77d1781a777b386335669)

History

#1 Updated by Sage Weil about 7 years ago

  • Status changed from New to 12
  • Priority changed from Normal to High

seems like a systemd bug that the generated name isn't unique :(

we can work around this with --unit=...

this is needed for hammer. infernalis+ uses systemd natively (not systemd-run) so this won't be an issue

#2 Updated by chuanhong wang about 7 years ago

Tt would be better to attach the ceph daemon name with time stamp to generate the service name. Change for hammer: https://github.com/ceph/ceph/pull/6271

#3 Updated by Loïc Dachary about 7 years ago

  • Status changed from 12 to In Progress
  • Release deleted (giant)
  • Release set to hammer

#5 Updated by Loïc Dachary about 7 years ago

  • Subject changed from Ceph daemon was failed to be started, because the service name was alread used. to Ceph daemon failed to start, because the service name was already used.

#6 Updated by Loïc Dachary about 7 years ago

  • Description updated (diff)

#7 Updated by Kefu Chai about 7 years ago

  • Status changed from In Progress to Fix Under Review
  • Assignee set to chuanhong wang

#8 Updated by Loïc Dachary about 7 years ago

  • Backport set to hammer

#9 Updated by Loïc Dachary about 7 years ago

  • Backport changed from hammer to hammer,infernalis

#10 Updated by Samuel Just about 7 years ago

  • Status changed from Fix Under Review to Pending Backport

#11 Updated by Loïc Dachary about 7 years ago

  • Copied to Backport #13935: infernalis: Ceph daemon failed to start, because the service name was already used. added

#12 Updated by Loïc Dachary about 7 years ago

  • Copied to Backport #13936: hammer: Ceph daemon failed to start, because the service name was already used. added

#14 Updated by Loïc Dachary almost 7 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF