The field(diagnose_data_collector_filename) stores the filename of the
script diagnose data collector will run to get information about
node health.

Also expose this field in Luxi queries.

Signed-off-by: BSRK Aditya <[email protected]>
---
 lib/objects.py             | 1 +
 src/Ganeti/Objects.hs      | 2 ++
 src/Ganeti/Query/Server.hs | 2 ++
 3 files changed, 5 insertions(+)

diff --git a/lib/objects.py b/lib/objects.py
index 0655443..22ef009 100644
--- a/lib/objects.py
+++ b/lib/objects.py
@@ -1672,6 +1672,7 @@ class Cluster(TaggableObject):
     "compression_tools",
     "enabled_user_shutdown",
     "data_collectors",
+    "diagnose_data_collector_filename",
     ] + _TIMESTAMPS + _UUID
 
   def UpgradeConfig(self):
diff --git a/src/Ganeti/Objects.hs b/src/Ganeti/Objects.hs
index ee4fd70..85f3576 100644
--- a/src/Ganeti/Objects.hs
+++ b/src/Ganeti/Objects.hs
@@ -672,6 +672,8 @@ $(buildObject "Cluster" "cluster" $
   , simpleField "compression_tools"              [t| [String]                |]
   , simpleField "enabled_user_shutdown"          [t| Bool                    |]
   , simpleField "data_collectors"         [t| Container DataCollectorConfig  |]
+  , defaultField [| [] |] $ simpleField
+      "diagnose_data_collector_filename"         [t| String                  |]
  ]
  ++ timeStampFields
  ++ uuidFields
diff --git a/src/Ganeti/Query/Server.hs b/src/Ganeti/Query/Server.hs
index e3789b3..3ea20bf 100644
--- a/src/Ganeti/Query/Server.hs
+++ b/src/Ganeti/Query/Server.hs
@@ -270,6 +270,8 @@ handleCall _ _ cdata QueryClusterInfo =
             , ("data_collector_interval",
                showJSON . fmap dataCollectorInterval
                         $ clusterDataCollectors cluster)
+            , ("diagnose_data_collector_filename",
+               showJSON $ clusterDiagnoseDataCollectorFilename cluster)
             , ("maint_round_delay",
                showJSON . maintRoundDelay $ configMaintenance  cdata)
             , ("maint_balance",
-- 
2.5.0.rc2.392.g76e840b

Reply via email to