Project

General

Profile

Bug #38480

ceph-mon does not start when using a custom cluster name

Added by Khodayar Doustar about 5 years ago. Updated about 5 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Category:
Monitor
Target version:
% Done:

0%

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

Description

When you use a custom cluster name, ceph-mon won't start with this error: (cl4 is the hostname)

Feb 26 13:49:42 cl4 systemd1: Started Ceph cluster monitor daemon.
-- Subject: Unit ceph-mon@cl4.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ceph-mon@cl4.service has finished starting up.
--
-- The start-up result is done.
Feb 26 13:49:42 cl4 ceph-mon6386: did not load config file, using default settings.
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 1 Errors while parsing config file!
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 -1 parse_file: cannot open /.ceph/ceph.conf: (2) No such file or directory
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 -1 parse_file: cannot open ceph.conf: (2) No such file or directory
Feb 26 13:49:42 cl4 systemd1: ceph-mon@cl4.service: main process exited, code=exited, status=1/FAILURE
Feb 26 13:49:42 cl4 systemd1: Unit ceph-mon@cl4.service entered failed state.
Feb 26 13:49:42 cl4 systemd1: ceph-mon@cl4.service failed.
Feb 26 13:49:52 cl4 systemd1: ceph-mon@cl4.service holdoff time over, scheduling restart.
Feb 26 13:49:52 cl4 systemd1: Stopped Ceph cluster monitor daemon.
-
Subject: Unit ceph-mon@cl4.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ceph-mon@cl4.service has finished shutting down.
Feb 26 13:49:52 cl4 systemd1: start request repeated too quickly for ceph-mon@cl4.service
Feb 26 13:49:52 cl4 systemd1: Failed to start Ceph cluster monitor daemon.
-- Subject: Unit ceph-mon@cl4.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ceph-mon@cl4.service has failed.
--
-- The result is failed.
Feb 26 13:49:52 cl4 systemd1: Unit ceph-mon@cl4.service entered failed state.
Feb 26 13:49:52 cl4 systemd1: ceph-mon@cl4.service failed.

but when I changes this line in this file:

/usr/lib/systemd/system/ceph-mon@.service

Environment=CLUSTER=newclusterbane

it starts.
I guess it's a bug and this parameter should be dynamically assigned, not hard coded.

Thanks,

History

#1 Updated by Alfredo Deza about 5 years ago

  • Project changed from ceph-volume to Ceph
  • Category set to Monitor

#2 Updated by Khodayar Doustar about 5 years ago

Khodayar Doustar wrote:

When you use a custom cluster name, ceph-mon won't start with this error: (cl4 is the hostname)

Feb 26 13:49:42 cl4 systemd1: Started Ceph cluster monitor daemon.
-- Subject: Unit ceph-mon@cl4.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ceph-mon@cl4.service has finished starting up.
--
-- The start-up result is done.
Feb 26 13:49:42 cl4 ceph-mon6386: did not load config file, using default settings.
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 1 Errors while parsing config file!
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 -1 parse_file: cannot open /.ceph/ceph.conf: (2) No such file or directory
Feb 26 13:49:42 cl4 ceph-mon6386: 2019-02-26 13:49:42.411 7f7705f63140 -1 parse_file: cannot open ceph.conf: (2) No such file or directory
Feb 26 13:49:42 cl4 systemd1: ceph-mon@cl4.service: main process exited, code=exited, status=1/FAILURE
Feb 26 13:49:42 cl4 systemd1: Unit ceph-mon@cl4.service entered failed state.
Feb 26 13:49:42 cl4 systemd1: ceph-mon@cl4.service failed.
Feb 26 13:49:52 cl4 systemd1: ceph-mon@cl4.service holdoff time over, scheduling restart.
Feb 26 13:49:52 cl4 systemd1: Stopped Ceph cluster monitor daemon.
-
Subject: Unit ceph-mon@cl4.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ceph-mon@cl4.service has finished shutting down.
Feb 26 13:49:52 cl4 systemd1: start request repeated too quickly for ceph-mon@cl4.service
Feb 26 13:49:52 cl4 systemd1: Failed to start Ceph cluster monitor daemon.
-- Subject: Unit ceph-mon@cl4.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ceph-mon@cl4.service has failed.
--
-- The result is failed.
Feb 26 13:49:52 cl4 systemd1: Unit ceph-mon@cl4.service entered failed state.
Feb 26 13:49:52 cl4 systemd1: ceph-mon@cl4.service failed.

but when I changes this line in this file:

/usr/lib/systemd/system/ceph-mon@.service

Environment=CLUSTER=newclustername

it starts.
I guess it's a bug and this parameter should be dynamically assigned, not hard coded.

Thanks,

#3 Updated by Khodayar Doustar about 5 years ago

This could be a good workaround, you have to run it on each node before starting installation:

for i in /usr/lib/systemd/system/*ceph*.service ; do sed -i 's/Environment=CLUSTER=ceph/Environment=CLUSTER=newclustername/g' $i; done

#4 Updated by Greg Farnum about 5 years ago

  • Status changed from New to Won't Fix

Cluster names aren't supported in 13, sorry. :(

#5 Updated by Khodayar Doustar about 5 years ago

Greg Farnum wrote:

Cluster names aren't supported in 13, sorry. :(

But I've fixed this issue with that script, mu cluster is now up and running!

Also available in: Atom PDF