[ 
https://issues.apache.org/jira/browse/OOZIE-3086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Sasvari resolved OOZIE-3086.
-----------------------------------
    Resolution: Duplicate

> Oozie shell action ignores absolute path
> ----------------------------------------
>
>                 Key: OOZIE-3086
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3086
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>    Affects Versions: 3.1.3, 3.2.0, 3.3.0, trunk, 3.3.1, 3.3.2, 4.0.0, 4.1.0, 
> 4.0.1, 4.2.0, 4.3.0
>            Reporter: Attila Sasvari
>            Priority: Major
>
> [ShellActionExecutor's setupActionConf() method| 
> https://github.com/apache/oozie/blob/883c7556d2f302261eae5aec6e323a5b1de04f74/core/src/main/java/org/apache/oozie/action/hadoop/ShellActionExecutor.java#L57]
>  retrieves only the *basename* for the shell script specified by the user.
> {code}
>     Configuration setupActionConf(Configuration actionConf, Context context, 
> Element actionXml, Path appPath)
>     {
> ...
>         String exec = actionXml.getChild("exec", ns).getTextTrim();
>         String execName = new Path(exec).getName();
>         actionConf.set(ShellMain.CONF_OOZIE_SHELL_EXEC, execName);
> {code}
> As a result, {{ShellMain}} will 
> [execute|https://github.com/apache/oozie/blob/883c7556d2f302261eae5aec6e323a5b1de04f74/sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java#L356]
>  the default command available in $PATH.
> {code}
>     protected String getExec(Configuration actionConf) {
>         String exec = actionConf.get(CONF_OOZIE_SHELL_EXEC);
> {code}
> Consequences:
> - This behaviour makes it also hard/impossible to use custom executable at a 
> given location (that is available on each node where a shell action can run, 
> for example a specific python version).
> - Even if a user specifies a wrong path (e.g. a non-existing {{/usr/bn/id}}) 
> on purpose to force failure of a shell action, the command might succeed with 
> no apparent reason.



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

Reply via email to