]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
node-proxy: display error messages when Exception is caught
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 11 May 2023 11:29:05 +0000 (13:29 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 14:43:29 +0000 (14:43 +0000)
This is mostly for development purposes.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/cephadm/node-proxy/redfish_client.py
src/cephadm/node-proxy/redfish_system.py

index 8b85daeace38e3555fe5a263c84e3d2efca84ede..52ae3c089def852dc463db4978949a84e60ffdce 100644 (file)
@@ -35,6 +35,7 @@ class RedFishClient:
             return response.dict
         except Exception as e:
             #TODO
+            log.error(f"Error detected.\n{e}")
             pass
 
     def logout(self):
index ae02062a469f4157771e665c3c670af1def068c9..6dd457774d9fa5dc01e8864b98692818a8f8f868 100644 (file)
@@ -95,7 +95,7 @@ class RedfishSystem(System):
                 self._update_storage()
                 sleep(3)
         # Catching 'Exception' is probably not a good idea (devel only)
-        except Exception:
-            log.error(f"Error detected, logging out from redfish api")
+        except Exception as e:
+            log.error(f"Error detected, logging out from redfish api.\n{e}")
             self.client.logout()
             raise