]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
mon: fix create on fedora to use systemd
authorSage Weil <sage@redhat.com>
Tue, 28 Jul 2015 19:09:44 +0000 (15:09 -0400)
committerSage Weil <sage@redhat.com>
Tue, 28 Jul 2015 19:09:44 +0000 (15:09 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
ceph_deploy/hosts/fedora/mon/create.py

index d0dddbd6b6395ee45eba33d5e65dc42699993949..139e00e1c590cd2e3562b1ffcbf84fd86364e9d2 100644 (file)
@@ -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,
     )