summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2021-10-26 11:33:01 +0200
committerDmitry Tantsur <dtantsur@protonmail.com>2021-10-27 10:42:31 +0000
commitf9ed56ea854f012dd37f10f6551c8effb40d6abc (patch)
tree6b6753a1039c3563cb6e1783a41bdd7f487368c8
parent5898a9301d5210f7047713ec6519fe4d8f7ca5cf (diff)
downloadironic-python-agent-f9ed56ea854f012dd37f10f6551c8effb40d6abc.tar.gz
Fix error messages in burnin code
Change-Id: Ib920b6f8da2c2c9d72dbb8bbd8915bde767bddd2 (cherry picked from commit 9a8c6a831aa1189a28e90537a03547af8c353eb3)
-rw-r--r--ironic_python_agent/burnin.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/ironic_python_agent/burnin.py b/ironic_python_agent/burnin.py
index f3918173..c97eea96 100644
--- a/ironic_python_agent/burnin.py
+++ b/ironic_python_agent/burnin.py
@@ -48,8 +48,7 @@ def stress_ng_cpu(node):
# stress-ng reports on stderr only
LOG.info(err)
except (processutils.ProcessExecutionError, OSError) as e:
- error_msg = ("stress-ng (cpu) failed with error %(err)s",
- {'err': e})
+ error_msg = "stress-ng (cpu) failed with error %s" % e
LOG.error(error_msg)
raise errors.CommandExecutionError(error_msg)
@@ -80,8 +79,7 @@ def stress_ng_vm(node):
# stress-ng reports on stderr only
LOG.info(err)
except (processutils.ProcessExecutionError, OSError) as e:
- error_msg = ("stress-ng (vm) failed with error %(err)s",
- {'err': e})
+ error_msg = "stress-ng (vm) failed with error %s" % e
LOG.error(error_msg)
raise errors.CommandExecutionError(error_msg)
@@ -116,8 +114,7 @@ def fio_disk(node):
# fio reports on stdout
LOG.info(out)
except (processutils.ProcessExecutionError, OSError) as e:
- error_msg = ("fio (disk) failed with error %(err)s",
- {'err': e})
+ error_msg = "fio (disk) failed with error %s" % e
LOG.error(error_msg)
raise errors.CommandExecutionError(error_msg)
@@ -141,8 +138,7 @@ def _do_fio_network(writer, runtime, partner):
LOG.info(out)
break
except (processutils.ProcessExecutionError, OSError) as e:
- error_msg = ("fio (network) failed with error %(err)s",
- {'err': e})
+ error_msg = "fio (network) failed with error %s" % e
LOG.error(error_msg)
# while the writer blocks in fio, the reader fails with
# 'Connection {refused, timeout}' errors if the partner
@@ -186,7 +182,7 @@ def fio_network(node):
role = config.get('role')
if role not in NETWORK_BURNIN_ROLES:
- error_msg = ("fio (network) found an unknown role: %s", role)
+ error_msg = "fio (network) found an unknown role: %s" % role
raise errors.CleaningError(error_msg)
partner = config.get('partner')