We also ran into this problem on upgrading Ubuntu from 14.04 to 16.04. The service file is not being automatically created. The issue was resolved with the following steps:

$ sudo systemctl enable ceph-mon@your-hostname
/Created symlink from /etc/systemd/system/ceph-mon.target.wants/ceph-mon@your-hostname.service to /lib/systemd/system/ceph-mon@.service./

$ sudo systemctl enable ceph-mon@your-hostname

$ sudo systemctl start ceph-mon@your-hostname

Now it should start and join the cluster.

-David



On 01/25/2017 02:35 PM, Wido den Hollander wrote:
Op 25 januari 2017 om 20:25 schreef Patrick Donnelly <pdonn...@redhat.com>:


On Wed, Jan 25, 2017 at 2:19 PM, Wido den Hollander <w...@42on.com> wrote:
Hi,

I thought this issue was resolved a while ago, but while testing Kraken with 
BlueStore I ran into the problem again.

My monitors are not being started on boot:

Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-59-generic x86_64)

  * Documentation:  https://help.ubuntu.com
  * Management:     https://landscape.canonical.com
  * Support:        https://ubuntu.com/advantage
Last login: Wed Jan 25 15:08:57 2017 from 2001:db8::100
root@bravo:~# systemctl status ceph-mon.target
● ceph-mon.target - ceph target allowing to start/stop all ceph-mon@.service 
instances at once
    Loaded: loaded (/lib/systemd/system/ceph-mon.target; disabled; vendor 
preset: enabled)
    Active: inactive (dead)
root@bravo:~#

If I enable ceph-mon.target my Monitors start just fine on boot:

root@bravo:~# systemctl enable ceph-mon.target
Created symlink from 
/etc/systemd/system/multi-user.target.wants/ceph-mon.target to 
/lib/systemd/system/ceph-mon.target.
Created symlink from /etc/systemd/system/ceph.target.wants/ceph-mon.target to 
/lib/systemd/system/ceph-mon.target.
root@bravo:~# ceph -v
ceph version 11.2.0 (f223e27eeb35991352ebc1f67423d4ebc252adb7)
root@bravo:~#

Anybody else seeing this before I start digging into the .deb packaging?
Are you wanting ceph-mon.target to automatically be enabled on package
install? That doesn't sound good to me but I'm not familiar with
Ubuntu's packaging rules. I would think the sysadmin must enable the
services they install themselves.

Under Ubuntu that usually happens yes. This system however was installed with 
ceph-deploy (1.5.37) OSDs started on boot, but the MONs didn't.

The OSDs were started by udev/ceph-disk however.

I checked my ceph-deploy log and I found:

[2017-01-23 18:56:56,370][alpha][INFO  ] Running command: systemctl enable 
ceph.target
[2017-01-23 18:56:56,394][alpha][WARNING] Created symlink from 
/etc/systemd/system/multi-user.target.wants/ceph.target to 
/lib/systemd/system/ceph.target.
[2017-01-23 18:56:56,487][alpha][INFO  ] Running command: systemctl enable 
ceph-mon@alpha
[2017-01-23 18:56:56,504][alpha][WARNING] Created symlink from 
/etc/systemd/system/ceph-mon.target.wants/ceph-mon@alpha.service to 
/lib/systemd/system/ceph-mon@.service.
[2017-01-23 18:56:56,656][alpha][INFO  ] Running command: systemctl start 
ceph-mon@alpha

It doesn't seem to enable ceph-mon.target thus not enabling the MON to start on 
boot.

This small cluster runs inside VirtualBox with the machines alpha, bravo and 
charlie.

Wido

--
Patrick Donnelly
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

--
~~~~~~
David Welch
DevOps
ARS
http://thinkars.com

_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to