]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/ssh,orchestrator_cli: add 'restart' service action
authorSage Weil <sage@redhat.com>
Thu, 31 Oct 2019 14:39:30 +0000 (09:39 -0500)
committerSage Weil <sage@redhat.com>
Mon, 4 Nov 2019 14:03:48 +0000 (08:03 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
doc/mgr/orchestrator_cli.rst
src/pybind/mgr/orchestrator.py
src/pybind/mgr/orchestrator_cli/module.py
src/pybind/mgr/ssh/module.py

index cc21093efc5c7985f8a3fd7217133a0aa3c7dc9c..bfe0462ae490a166922fde3133513f710ed54e35 100644 (file)
@@ -297,11 +297,11 @@ This is an overview of the current implementation status of the orchestrators.
  device ls                           ✔️         ✔️       ✔️         ✔️
  service ls                          ⚪         ✔️       ✔️         ✔
  service-instance status             ⚪         ⚪       ⚪         ✔
+ service-instance {stop,start,...}   ⚪         ⚪       ⚪         ✔
  iscsi {stop,start,reload}           ⚪         ⚪       ⚪         ⚪
  iscsi add                           ⚪         ⚪       ⚪         ⚪
  iscsi rm                            ⚪         ⚪       ⚪         ⚪
  iscsi update                        ⚪         ⚪       ⚪         ⚪
- mds {stop,start,reload}             ⚪         ⚪       ⚪         ⚪
  mds add                             ⚪         ✔️       ⚪         ✔
  mds rm                              ⚪         ✔️       ⚪         ✔
  mds update                          ⚪         ✔       ⚪         ✔
index 86d375046d8ad21ac421ffd0bb98a5e0d137730c..2c8fb02f936dc7fd442750d8261c963765b81422 100644 (file)
@@ -405,7 +405,7 @@ class Orchestrator(object):
         * If using service_id, perform the action on a single specific daemon
           instance.
 
-        :param action: one of "start", "stop", "reload"
+        :param action: one of "start", "stop", "reload", "restart"
         :param service_type: e.g. "mds", "rgw", ...
         :param service_name: name of logical service ("cephfs", "us-east", ...)
         :param service_id: service daemon instance (usually a short hostname)
index b051d2f1490b98455066a7eeddf8c2069c3feb6e..45bd20330a4a67ec6de788e2678b0af5705af465 100644 (file)
@@ -344,7 +344,7 @@ Usage:
         return HandleCommandResult(stdout=completion.result_str())
 
     @_write_cli('orchestrator service',
-                "name=action,type=CephChoices,strings=start|stop|reload "
+                "name=action,type=CephChoices,strings=start|stop|reload|restart "
                 "name=svc_type,type=CephString "
                 "name=svc_name,type=CephString",
                 'Start, stop or reload an entire service (i.e. all daemons)')
@@ -355,7 +355,7 @@ Usage:
         return HandleCommandResult(stdout=completion.result_str())
 
     @_write_cli('orchestrator service-instance',
-                "name=action,type=CephChoices,strings=start|stop|reload "
+                "name=action,type=CephChoices,strings=start|stop|reload|restart "
                 "name=svc_type,type=CephString "
                 "name=svc_id,type=CephString",
                 'Start, stop or reload a specific service instance')
index 5beafa2592693a694435881dce365ebcbe3f1882..8cf4c8a164740a4b366b8c6f84745b49ceebcebb 100644 (file)
@@ -529,6 +529,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator):
         actions = {
             'start': ['reset-failed', 'start'],
             'stop': ['stop'],
+            'restart': ['reset-failed', 'restart'],
         }
         name = '%s.%s' % (service_type, service_id)
         for a in actions[action]: