Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3086

Oozie shell action ignores absolute path

    XMLWordPrintableJSON

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
    • action
    • 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

          Activity

            People

              Unassigned Unassigned
              asasvari Attila Sasvári
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: