When a command fails, the logs should contain:
- the exact command that was run (because, very often, one will be able to re-launch that same command plus debugging enabled to understand what the problem is).
- the error returned by the command
Note that this was done for the power commands (but only for them) in src/provisioningserver/power/poweraction.py:PowerActionFail.
I think this should be generalized and applied to every single call we make to subprocess.check_output and the likes.
When a command fails, the logs should contain:
- the exact command that was run (because, very often, one will be able to re-launch that same command plus debugging enabled to understand what the problem is).
- the error returned by the command
Note that this was done for the power commands (but only for them) in src/provisionin gserver/ power/poweracti on.py:PowerActi onFail.
I think this should be generalized and applied to every single call we make to subprocess. check_output and the likes.