In our current code we have this (in several places):
with remote_exec.RemoteExec(self.machine, self.port, self.user, self.ssh_privkey, stdio_filename) as ssh: task_runner = RemoteRunner(ssh, self.task_data, self.arg_data) try: task_runner.prepare_task() task_runner.run() except exc.TaskotronRemoteError, e: log.exception(e) task_runner.get_output() self.exitcode = task_runner.exitcode
The problem is that is supresses any TaskotronRemoteError that occurs during execution on a disposable or persistent machine. It logs it, but then it continues like nothing happened. It can even look like the task was correctly executed (and either some partial results will be reported or no results at all, which is also valid), even though it wasn't. Is there any reason for that? @mkrizek, I guess you wrote most of this code, do you know?
TaskotronRemoteError
I'd personally rather raise the exception (log and re-raise) or maybe not even catch it in the first place (it will get logged at some place up the stack anyways).
Thoughts?
(If we decide to change this, it might be wise to wait a bit until D550 lands).
This ticket had assigned some Differential requests: D612
There might have been a reason to do that but I don't recall now and recent changes to the code could have made the reason invalid. Let me investigate again once D550 lands.
Login to comment on this ticket.