Skip to content

Commit c824dda

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix error messages in burnin code"
2 parents 8a66978 + 9a8c6a8 commit c824dda

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

ironic_python_agent/burnin.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ def stress_ng_cpu(node):
4848
# stress-ng reports on stderr only
4949
LOG.info(err)
5050
except (processutils.ProcessExecutionError, OSError) as e:
51-
error_msg = ("stress-ng (cpu) failed with error %(err)s",
52-
{'err': e})
51+
error_msg = "stress-ng (cpu) failed with error %s" % e
5352
LOG.error(error_msg)
5453
raise errors.CommandExecutionError(error_msg)
5554

@@ -80,8 +79,7 @@ def stress_ng_vm(node):
8079
# stress-ng reports on stderr only
8180
LOG.info(err)
8281
except (processutils.ProcessExecutionError, OSError) as e:
83-
error_msg = ("stress-ng (vm) failed with error %(err)s",
84-
{'err': e})
82+
error_msg = "stress-ng (vm) failed with error %s" % e
8583
LOG.error(error_msg)
8684
raise errors.CommandExecutionError(error_msg)
8785

@@ -116,8 +114,7 @@ def fio_disk(node):
116114
# fio reports on stdout
117115
LOG.info(out)
118116
except (processutils.ProcessExecutionError, OSError) as e:
119-
error_msg = ("fio (disk) failed with error %(err)s",
120-
{'err': e})
117+
error_msg = "fio (disk) failed with error %s" % e
121118
LOG.error(error_msg)
122119
raise errors.CommandExecutionError(error_msg)
123120

@@ -141,8 +138,7 @@ def _do_fio_network(writer, runtime, partner):
141138
LOG.info(out)
142139
break
143140
except (processutils.ProcessExecutionError, OSError) as e:
144-
error_msg = ("fio (network) failed with error %(err)s",
145-
{'err': e})
141+
error_msg = "fio (network) failed with error %s" % e
146142
LOG.error(error_msg)
147143
# while the writer blocks in fio, the reader fails with
148144
# 'Connection {refused, timeout}' errors if the partner
@@ -186,7 +182,7 @@ def fio_network(node):
186182

187183
role = config.get('role')
188184
if role not in NETWORK_BURNIN_ROLES:
189-
error_msg = ("fio (network) found an unknown role: %s", role)
185+
error_msg = "fio (network) found an unknown role: %s" % role
190186
raise errors.CleaningError(error_msg)
191187

192188
partner = config.get('partner')

0 commit comments

Comments
 (0)