From: Sage Weil Date: Tue, 28 Jul 2015 19:09:44 +0000 (-0400) Subject: mon: fix create on fedora to use systemd X-Git-Tag: v1.5.27~5^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c7107bc44d39323ed694373f258518213619dead;p=ceph-deploy.git mon: fix create on fedora to use systemd Signed-off-by: Sage Weil --- diff --git a/ceph_deploy/hosts/fedora/mon/create.py b/ceph_deploy/hosts/fedora/mon/create.py index d0dddbd..139e00e 100644 --- a/ceph_deploy/hosts/fedora/mon/create.py +++ b/ceph_deploy/hosts/fedora/mon/create.py @@ -5,17 +5,34 @@ from ceph_deploy.lib import remoto def create(distro, args, monitor_keyring): hostname = distro.conn.remote_module.shortname() common.mon_create(distro, args, monitor_keyring, hostname) - service = distro.conn.remote_module.which_service() + # enable ceph target for this host (in case it isn't already enabled) remoto.process.run( distro.conn, [ - service, - 'ceph', - '-c', - '/etc/ceph/{cluster}.conf'.format(cluster=args.cluster), + 'systemctl', + 'enable', + 'ceph.target' + ], + timeout=7, + ) + + # enable and start this mon instance + remoto.process.run( + distro.conn, + [ + 'systemctl', + 'enable', + 'ceph-mon@{hostname}'.format(hostname=hostname), + ], + timeout=7, + ) + remoto.process.run( + distro.conn, + [ + 'systemctl', 'start', - 'mon.{hostname}'.format(hostname=hostname) + 'ceph-mon@{hostname}'.format(hostname=hostname), ], timeout=7, )