]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
remove pushy from attempting to start the mons
authorAlfredo Deza <alfredo.deza@inktank.com>
Wed, 11 Sep 2013 15:35:34 +0000 (11:35 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Wed, 11 Sep 2013 20:47:57 +0000 (16:47 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/hosts/centos/mon/create.py
ceph_deploy/hosts/debian/mon/create.py
ceph_deploy/hosts/fedora/mon/create.py
ceph_deploy/hosts/suse/mon/create.py

index 51dfdcb0e9d9bffff0e7f1ff0f8f8b63b25e46e8..a0b7bdb4fbd2c4b090cc1e4410336fd63f1428b1 100644 (file)
@@ -1,20 +1,22 @@
-from ceph_deploy.util.wrappers import check_call
 from ceph_deploy.hosts import common
 from ceph_deploy.misc import remote_shortname
+from ceph_deploy.lib.remoto import Connection, process
 
 
 def create(distro, logger, args, monitor_keyring):
     hostname = remote_shortname(distro.sudo_conn.modules.socket)
     common.mon_create(distro, logger, args, monitor_keyring, hostname)
     service = common.which_service(distro.sudo_conn, logger)
-    check_call(
-        distro.sudo_conn,
-        logger,
+
+    # TODO transition this once pushy is out
+    rconn = Connection(hostname, logger, sudo=True)
+    process.run(
+        rconn,
         [
             service,
             'ceph',
             'start',
             'mon.{hostname}'.format(hostname=hostname)
         ],
-        patch=False,
+        exit=True,
     )
index 4592c5050d9c268f9b1c44b28692db7640a79b95..40f6e8dc16a9a9a0c1e8c703dccbf25bb3a97f75 100644 (file)
@@ -1,16 +1,18 @@
-from ceph_deploy.util.wrappers import check_call
 from ceph_deploy.hosts import common
 from ceph_deploy.misc import remote_shortname
+from ceph_deploy.lib.remoto import Connection, process
 
 
 def create(distro, logger, args, monitor_keyring):
     hostname = remote_shortname(distro.sudo_conn.modules.socket)
     common.mon_create(distro, logger, args, monitor_keyring, hostname)
 
-    if distro.init == 'upstart': # Ubuntu uses upstart
-        check_call(
-            distro.sudo_conn,
-            logger,
+    # TODO transition this once pushy is out
+    rconn = Connection(hostname, logger, sudo=True)
+
+    if distro.init == 'upstart':  # Ubuntu uses upstart
+        process.run(
+            rconn,
             [
                 'initctl',
                 'emit',
@@ -18,22 +20,21 @@ def create(distro, logger, args, monitor_keyring):
                 'cluster={cluster}'.format(cluster=args.cluster),
                 'id={hostname}'.format(hostname=hostname),
             ],
-            patch=False,
+            exit=True,
         )
 
-    elif distro.init == 'sysvinit': # Debian uses sysvinit
+    elif distro.init == 'sysvinit':  # Debian uses sysvinit
         service = common.which_service(distro.sudo_conn, logger)
 
-        check_call(
-            distro.sudo_conn,
-            logger,
+        process.run(
+            rconn,
             [
                 service,
                 'ceph',
                 'start',
                 'mon.{hostname}'.format(hostname=hostname)
             ],
-            patch=False,
+            exit=True,
         )
     else:
         raise RuntimeError('create cannot use init %s' % distro.init)
index 80da3af9d10b8a8bfe55263cf8c713dc64cfa7d3..e8fa199b3d7d3e4066da313d55de4a19f17ecc17 100644 (file)
@@ -1,6 +1,6 @@
-from ceph_deploy.util.wrappers import check_call
 from ceph_deploy.hosts import common
 from ceph_deploy.misc import remote_shortname
+from ceph_deploy.lib.remoto import Connection, process
 
 
 def create(distro, logger, args, monitor_keyring):
@@ -8,14 +8,16 @@ def create(distro, logger, args, monitor_keyring):
     common.mon_create(distro, logger, args, monitor_keyring, hostname)
     service = common.which_service(distro.sudo_conn, logger)
 
-    check_call(
-        distro.sudo_conn,
-        logger,
+    # TODO transition this once pushy is out
+    rconn = Connection(hostname, logger, sudo=True)
+
+    process.run(
+        rconn,
         [
             service,
             'ceph',
             'start',
             'mon.{hostname}'.format(hostname=hostname)
         ],
-        patch=False,
+        exit=True,
     )
index 80da3af9d10b8a8bfe55263cf8c713dc64cfa7d3..e8fa199b3d7d3e4066da313d55de4a19f17ecc17 100644 (file)
@@ -1,6 +1,6 @@
-from ceph_deploy.util.wrappers import check_call
 from ceph_deploy.hosts import common
 from ceph_deploy.misc import remote_shortname
+from ceph_deploy.lib.remoto import Connection, process
 
 
 def create(distro, logger, args, monitor_keyring):
@@ -8,14 +8,16 @@ def create(distro, logger, args, monitor_keyring):
     common.mon_create(distro, logger, args, monitor_keyring, hostname)
     service = common.which_service(distro.sudo_conn, logger)
 
-    check_call(
-        distro.sudo_conn,
-        logger,
+    # TODO transition this once pushy is out
+    rconn = Connection(hostname, logger, sudo=True)
+
+    process.run(
+        rconn,
         [
             service,
             'ceph',
             'start',
             'mon.{hostname}'.format(hostname=hostname)
         ],
-        patch=False,
+        exit=True,
     )