]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/deepsea: log salt job failures
authorTim Serong <tserong@suse.com>
Thu, 14 Mar 2019 11:48:44 +0000 (22:48 +1100)
committerTim Serong <tserong@suse.com>
Tue, 2 Apr 2019 06:14:38 +0000 (17:14 +1100)
If a request to salt succeeds, but the event comes back with some internal
failure (e.g.: an exception was thrown inside the salt runner), we need to
log this so the admin can find out what on earth went wrong.

Signed-off-by: Tim Serong <tserong@suse.com>
src/pybind/mgr/deepsea/module.py

index 8fdb4e4fb4d85dcd971291fdbc600bd3d39fa305..6286942c2f5b340f52d6fdeff423f5e3cafec4e0 100644 (file)
@@ -144,6 +144,8 @@ class DeepSeaOrchestrator(MgrModule, orchestrator.Orchestrator):
                         dev.metadata_space_free = d['metadata_space_free']
                         devs.append(dev)
                     result.append(orchestrator.InventoryNode(node_name, devs))
+            else:
+                self.log.error(event_data['return'])
             return result
 
         with self._completion_lock:
@@ -189,6 +191,8 @@ class DeepSeaOrchestrator(MgrModule, orchestrator.Orchestrator):
                         desc.service_instance = service_instance
                         desc.service_type = service_type
                         result.append(desc)
+            else:
+                self.log.error(event_data['return'])
             return result
 
         with self._completion_lock: