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

Logging command arguments fails in certain scenarios when using EL functions.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 4.2.0
    • 5.0.0b1
    • None
    • None
    • All

    Description

      Change were recently made in OOZIE-2244 to mask passwords in logs when printing arguments. These changes cause failures in workflows that use basic EL functions that result in null values.

      For instance if someone is using the EL replaceAll function and it returns an empty string as a result (which is considered null) the following code fails (https://github.com/apache/oozie/commit/3276633f3002ad7e9096c4ee5b6c329f5a708248):

      if (arg.toLowerCase().contains("password"))
      

      This was working previously because at some point the null does get converted to an empty string, but it's after the point in which the args are printed.

      An example of an EL function causing this failure, where property foo was equal to "ALL":

      <arg>${replaceAll(foo, "^[aA][lL][lL]$", "")}</arg>
      

      ST:

      ....
                   null
      Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.JavaMain], exception invoking main(), null
      java.lang.NullPointerException
      	at org.apache.oozie.action.hadoop.LauncherMapper.printArgs(LauncherMapper.java:627)
      	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:212)
      	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
      	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
      	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
      	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:422)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)
      	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jackson Christopher Jackson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: