-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71425/
-----------------------------------------------------------

(Updated Sept. 4, 2019, 9:10 a.m.)


Review request for oozie, Andras Salamon, Denes Bodo, and Kinga Marton.


Changes
-------

Fixed issues, added assertion message


Bugs: OOZIE-3405
    https://issues.apache.org/jira/browse/OOZIE-3405


Repository: oozie-git


Description
-------

Currently, when an SSH action fails the only message that is returned is the 
Status. Neither the error Message nor Error code fields are filled. This makes 
reporting on the causes of SSH Action failures via Oozie highly impractical: 
the only meaningful bit of information there is on a failed SSH Action is the 
Status.

The Status is filled based on the presence (or lack of) the .error file that is 
produced in case the user submitted script returns with any other value than 0.

SshActionExecutor#getActionStatus
 ...
 String outFile = getRemoteFileName(context, action, "error", false, true);
 String checkErrorCmd = SSH_COMMAND_BASE + action.getTrackerUri() + " ls " + 
outFile;
 int retVal = getReturnValue(checkErrorCmd);
 ...
 
User requirement is to provide some more detailed information on the 
success/failure of the user-submitted script. That could be at a minimum the 
return value, optionally the last ~1K of the stderr that is drained. This 
information could then be communicated via errorMessage and ErrorCode


Diffs (updated)
-----

  core/src/main/java/org/apache/oozie/ErrorCode.java 6b0ce4700 
  core/src/main/java/org/apache/oozie/action/ssh/SshActionExecutor.java 
6956cba7b 
  core/src/main/resources/ssh-wrapper.sh e2e6f7f9b 
  core/src/test/java/org/apache/oozie/action/ssh/TestSshActionExecutor.java 
d68aed094 


Diff: https://reviews.apache.org/r/71425/diff/3/

Changes: https://reviews.apache.org/r/71425/diff/2-3/


Testing
-------

Unit testing is a bit awkward in thise case (I would like to ask for some 
advice), although I have managed to test on a live cluster.


Thanks,

Mate Juhasz

Reply via email to