]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[BZ-1282484] use the new utility when trying to stop a monitor
authorAlfredo Deza <adeza@redhat.com>
Tue, 2 Feb 2016 12:35:09 +0000 (07:35 -0500)
committerAlfredo Deza <adeza@redhat.com>
Tue, 2 Feb 2016 13:01:51 +0000 (08:01 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph_deploy/mon.py

index 0ade4268dd1eb2d7e380a0d8d9c8bc476c34cf94..37819353a605237d1dcaf000a480dd9cffa0cd1c 100644 (file)
@@ -328,7 +328,7 @@ def destroy_mon(conn, cluster, hostname):
         )
 
         # stop
-        if conn.remote_module.path_exists(os.path.join(path, 'upstart')):
+        if conn.remote_module.path_exists(os.path.join(path, 'upstart')) or system.is_upstart(conn):
             status_args = [
                 'initctl',
                 'status',
@@ -351,7 +351,7 @@ def destroy_mon(conn, cluster, hostname):
                 'ceph-mon@{hostname}.service'.format(hostname=hostname),
             ]
         else:
-            raise RuntimeError('unsupported init system detected, cannot continue')
+            raise RuntimeError('could not detect a supported init system, cannot continue')
 
         while retries:
             conn.logger.info('polling the daemon to verify it stopped')