Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
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
-
None
-
None
Description
ShellActionExecutor's setupActionConf() method retrieves only the basename for the shell script specified by the user.
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);
As a result, ShellMain will execute the default command available in $PATH.
protected String getExec(Configuration actionConf) { String exec = actionConf.get(CONF_OOZIE_SHELL_EXEC);
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.
Attachments
Issue Links
- duplicates
-
OOZIE-3320 Oozie ShellAction should support absolute bash file path
- Resolved