From: Alfredo Deza Date: Wed, 11 Sep 2013 15:35:34 +0000 (-0400) Subject: remove pushy from attempting to start the mons X-Git-Tag: v1.2.4~10^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8fefc4fc6d91d274d9af5373e0caabe2a55e0f38;p=ceph-deploy.git remove pushy from attempting to start the mons Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/centos/mon/create.py b/ceph_deploy/hosts/centos/mon/create.py index 51dfdcb..a0b7bdb 100644 --- a/ceph_deploy/hosts/centos/mon/create.py +++ b/ceph_deploy/hosts/centos/mon/create.py @@ -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, ) diff --git a/ceph_deploy/hosts/debian/mon/create.py b/ceph_deploy/hosts/debian/mon/create.py index 4592c50..40f6e8d 100644 --- a/ceph_deploy/hosts/debian/mon/create.py +++ b/ceph_deploy/hosts/debian/mon/create.py @@ -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) diff --git a/ceph_deploy/hosts/fedora/mon/create.py b/ceph_deploy/hosts/fedora/mon/create.py index 80da3af..e8fa199 100644 --- a/ceph_deploy/hosts/fedora/mon/create.py +++ b/ceph_deploy/hosts/fedora/mon/create.py @@ -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, ) diff --git a/ceph_deploy/hosts/suse/mon/create.py b/ceph_deploy/hosts/suse/mon/create.py index 80da3af..e8fa199 100644 --- a/ceph_deploy/hosts/suse/mon/create.py +++ b/ceph_deploy/hosts/suse/mon/create.py @@ -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, )