Due to several changes in the communication channel between controller
and the slaves, the NetTestSlave class was handling (and logging)
exceptions twice.
This patch removes the first unnecessary processing, so only a single
traceback is logged.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst/Slave/NetTestSlave.py | 44 ++++++++++++++++++--------------------------
1 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index d2dd484..f3a321a 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -211,32 +211,24 @@ class SlaveMethods:
return True
def run_command(self, command):
- try:
- cmd = NetTestCommand(self._command_context, command,
- self._resource_table, self._log_ctl)
- self._command_context.add_cmd(cmd)
-
- res = cmd.run()
- if not cmd.forked():
- self._command_context.del_cmd(cmd)
-
- if command["type"] == "system_config":
- if res["passed"]:
-
self._update_system_config(res["res_data"]["options"],
- command["persistent"])
- else:
- err = "Error occured while setting system "\
- "configuration (%s)" % res["err_msg"]
- logging.error(err)
-
- return res
- except:
- log_exc_traceback()
- cmd_type = command["type"]
- m_id = command["machine_id"]
- msg = "Execution of %s command on machine %s failed" \
- % (cmd_type, m_id)
- raise CommandException(msg)
+ cmd = NetTestCommand(self._command_context, command,
+ self._resource_table, self._log_ctl)
+ self._command_context.add_cmd(cmd)
+
+ res = cmd.run()
+ if not cmd.forked():
+ self._command_context.del_cmd(cmd)
+
+ if command["type"] == "system_config":
+ if res["passed"]:
+
self._update_system_config(res["res_data"]["options"],
+ command["persistent"])
+ else:
+ err = "Error occured while setting system "\
+ "configuration (%s)" % res["err_msg"]
+ logging.error(err)
+
+ return res
def machine_cleanup(self):
NetConfigDeviceAllCleanup()
--
1.7.7.6
Show replies by thread