From bdd98d37ade17c58b49cbd224b0352884340ea5b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 31 Jul 2015 15:44:41 -0400 Subject: [PATCH] rgw: fix systemd creation Analogous changes to mds create. Signed-off-by: Sage Weil --- ceph_deploy/rgw.py | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/ceph_deploy/rgw.py b/ceph_deploy/rgw.py index b4e9c57..e9899c6 100644 --- a/ceph_deploy/rgw.py +++ b/ceph_deploy/rgw.py @@ -105,14 +105,37 @@ def create_rgw(distro, name, cluster, init): ], timeout=7 ) + if distro.is_el: + system.enable_service(distro.conn, service='ceph-radosgw') elif init == 'systemd': - system.enable_service( - distro.conn, - service='ceph-radosgw@{name}'.format(name=name) + remoto.process.run( + conn, + [ + 'systemctl', + 'enable', + 'ceph-radosgw@{name}'.format(name=name), + ], + timeout=7 + ) + remoto.process.run( + conn, + [ + 'systemctl', + 'start', + 'ceph-radosgw@{name}'.format(name=name), + ], + timeout=7 + ) + remoto.process.run( + conn, + [ + 'systemctl', + 'enable', + 'ceph.target', + ], + timeout=7 ) - if distro.is_el: - system.enable_service(distro.conn, service='ceph-radosgw') def rgw_create(args): cfg = conf.ceph.load(args) -- 2.47.3