[
https://issues.apache.org/jira/browse/OOZIE-3319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574564#comment-16574564
]
Attila Sasvari commented on OOZIE-3319:
---------------------------------------
[~ericlin] thanks for the patch!
Remarks:
- If we redirect the standard output of the callback command to stdout, it may
interfere with the actual command's standard output; is not desirable. See
https://github.com/apache/oozie/blob/e229e4dbb42b7bc0fdb866ccc530b533a2b2008b/core/src/main/resources/ssh-wrapper.sh#L41
{code}
if $cmnd "$@" >>${stdout} 2>>${stderr}; then
{code}
- I checked the new wrapper: upon a successful execution, the stderr file will
contain
{code}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0^M100 5 0 0 100 5 0 691 --:--:-- --:--:-- --:--:--
714
{code}
- Upon failure:
{code}
Not able to perform callback operation.
Callback command: curl
http://localhost:21000/oozie/callback?id=0000000-180809004852667-oozie-oozi-W@ssh-6185&status=OK
--data-binary
@/root/oozie-oozi/0000000-180809004852667-oozie-oozi-W.bak/ssh-6185--ssh/20907.0000000-180809004852667-oozie-oozi-W@[email protected]
--request POST --header content-type:text/plain
{code}
I would suggest to only log the callback command in the failure case, and do
not redirect stdout.
- Did you consider to add a new test case to TestSshActionExecutor with an
invalid callback URL?
> Log SSH action callback error output
> ------------------------------------
>
> Key: OOZIE-3319
> URL: https://issues.apache.org/jira/browse/OOZIE-3319
> Project: Oozie
> Issue Type: Improvement
> Components: core
> Affects Versions: trunk
> Reporter: Eric Lin
> Assignee: Eric Lin
> Priority: Minor
> Attachments: OOZIE-3319.patch
>
>
> When SSH callback fails, there is no error message logged to tell us what was
> going on
> {code}
> if $callback; then
> echo "Callback operation successful."
> else
> echo "Not able to perform callback operation." >>${stderr}
> fi
> {code}
> The only message showed in the remote machine's log was "Not able to perform
> callback operation." which is useless.
> Request to log the stderr out of the $callback action to stderr log as well.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)