On Fri, Aug 07, 2015 at 03:07:59PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
... under /1/status as required per our design document.

Signed-off-by: Klaus Aehlig <[email protected]>
---
man/ganeti-maintd.rst       | 36 ++++++++++++++++++++++++++++++++++++
src/Ganeti/MaintD/Server.hs |  1 +
2 files changed, 37 insertions(+)

diff --git a/man/ganeti-maintd.rst b/man/ganeti-maintd.rst
index b6a107c..d04fa6a 100644
--- a/man/ganeti-maintd.rst
+++ b/man/ganeti-maintd.rst
@@ -51,6 +51,42 @@ encoded in JSON format and is specific to the particular 
request.
The root resource. It will return the list of supported protocol
versions. At the moment, only version ``1`` is supported.

+``1/status``
+++++++++++++
+
+List of all currently ongoing incidents. This is a list of JSON
+objects, each containing at least the following information.
+
+- ``uuid`` The unique identifier assigned to the event.
+
+- ``node`` The UUID of the node on which the even was observed.
+
+- ``original`` The very JSON object reported by self-diagnose data collector.
+
+- ``repair-status`` A string describing the progress made on this event so
+  far. It is one of the following.
+
+  + ``noted`` The event has been observed, but no action has been taken yet
+
+  + ``pending`` At least one job has been submitted in reaction to the event
+    and none of the submitted jobs has failed so far.
+
+  + ``canceled`` The event has been canceled, i.e., ordered to be ignored, but
+    is still observed.
+
+  + ``failed`` At least one of the submitted jobs has failed. To avoid further
+    damage, the repair daemon will not take any further action for this event.
+
+  + ``completed`` All Ganeti actions associated with this event have been
+    completed successfully, including tagging the node.
+
+- ``jobs`` The list of the numbers of ganeti jobs submitted in response to
+  this event.
+
+- ``tag`` A string that is the tag that either has been added to the node, or,
+  if the repair event is not yet finalized, will be added in case of success.
+
+
``/1/jobs``
+++++++++++
The list of jobs the daemon will wait for to finish, before starting
diff --git a/src/Ganeti/MaintD/Server.hs b/src/Ganeti/MaintD/Server.hs
index 33aa804..d634215 100644
--- a/src/Ganeti/MaintD/Server.hs
+++ b/src/Ganeti/MaintD/Server.hs
@@ -162,6 +162,7 @@ httpInterface memstate =
  <|> dir "1" (ifTop (plainJSON J.JSNull)
               <|> route [ ("jobs", exposeState msJobs memstate)
                         , ("evacuated", exposeState msEvacuated memstate)
+                         , ("status", exposeState msIncidents memstate)
                         ])
  <|> error404

--
2.5.0.rc2.392.g76e840b


LGTM

Reply via email to