You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Peter Orova (JIRA)" <ji...@apache.org> on 2019/01/03 08:52:00 UTC

[jira] [Commented] (OOZIE-3405) SSH action shows empty error Message and Error code

    [ https://issues.apache.org/jira/browse/OOZIE-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16732765#comment-16732765 ] 

Peter Orova commented on OOZIE-3405:
------------------------------------

[~asalamon74] Thank you for your insight, so setting the {{errorCode}} is off the table. Do you think we could still provide some information via the {{wf:errorMessage(String message)}} function? If we stored the return value of the script in the {{.error}} file, could we return that via the {{errorMessage}} function in the case of SSH actions?

> SSH action shows empty error Message and Error code
> ---------------------------------------------------
>
>                 Key: OOZIE-3405
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3405
>             Project: Oozie
>          Issue Type: Improvement
>            Reporter: Peter Orova
>            Assignee: Peter Orova
>            Priority: Minor
>
> 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.
> {noformat}
> SshActionExecutor#getActionStatus
>  ...
>  String outFile = getRemoteFileName(context, action, "error", false, true);
>  String checkErrorCmd = SSH_COMMAND_BASE + action.getTrackerUri() + " ls " + outFile;
>  int retVal = getReturnValue(checkErrorCmd);
>  ...
> {noformat}
>  
>  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}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)