2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-19 17:02:22 +00:00

Log IPMI plugin stack traces to the trace log

traceback.print_exc() went to stderr, where the log redirect tags every
line with its caller, traceback.py, which made the traces unreadable.
This commit is contained in:
Markus Hilger
2026-11-17 16:25:17 +01:00
parent e73a42ca5e
commit 75a5e75063
@@ -18,6 +18,7 @@ import confluent.exceptions as exc
from confluent.exceptions import exc_text
import confluent.firmwaremanager as firmwaremanager
import confluent.interface.console as conapi
import confluent.log as log
import confluent.messages as msg
import confluent.util as util
import copy
@@ -33,7 +34,6 @@ import aiohmi.ipmi.console as console
import aiohmi.ipmi.command as ipmicommand
import socket
import ssl
import traceback
import confluent.vinzmanager as vinzmanager
@@ -229,9 +229,8 @@ async def _ipmi_evtloop():
waiter.send()
except asyncio.CancelledError:
break
except: # TODO(jbjohnso): log the trace into the log
traceback.print_exc()
except Exception:
log.logtrace()
def get_conn_params(node, configdata):
@@ -495,7 +494,7 @@ async def perform_request(operator, node, element,
except Exception as e:
await results.put(msg.ConfluentNodeError(
node, 'Unexpected Error: {0}'.format(exc_text(e))))
traceback.print_exc()
log.logtrace()
finally:
await results.put('Done')