[
https://issues.apache.org/jira/browse/OOZIE-2749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christopher Jackson updated OOZIE-2749:
---------------------------------------
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):
{code}
if (arg.toLowerCase().contains("password"))
{code}
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":
{code}
<arg>${replaceAll(foo, "^[aA][lL][lL]$", "")}</arg>
{code}
ST:
{code}
....
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)
{code}
was:
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):
{code}
if (arg.toLowerCase().contains("password"))
{code}
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":
{code}
<arg>${replaceAll(foo, "^[aA][lL][lL]$", "")}</arg>
{code}
> Logging command arguments fails in certain scenarios when using EL functions.
> -----------------------------------------------------------------------------
>
> Key: OOZIE-2749
> URL: https://issues.apache.org/jira/browse/OOZIE-2749
> Project: Oozie
> Issue Type: Bug
> Affects Versions: 4.2.0
> Environment: All
> Reporter: Christopher Jackson
>
> 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):
> {code}
> if (arg.toLowerCase().contains("password"))
> {code}
> 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":
> {code}
> <arg>${replaceAll(foo, "^[aA][lL][lL]$", "")}</arg>
> {code}
> ST:
> {code}
> ....
> 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)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)