ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Re: Review Request 43387: Script Alert Parameters With Shell Characters Are Not Properly Escaped
Date Wed, 10 Feb 2016 15:52:16 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43387/
-----------------------------------------------------------

(Updated Feb. 10, 2016, 10:52 a.m.)


Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.


Bugs: AMBARI-14984
    https://issues.apache.org/jira/browse/AMBARI-14984


Repository: ambari


Description
-------

When creating a script alert, the parameters passed to that script should not have any un-escaped
special characters. Things like quotes can cause the arguments to be cut:

Original text passed in:
{code}
Metastore on c6403.ambari.apache.org failed "this is in quotes"
{code}

{code}
===============START================
Tue Feb 9 16:10:17 EST 2016
-> Argument:  hive_metastore_process
-> Argument:  Hive Metastore Process
-> Argument:  HIVE
-> Argument:  CRITICAL
-> Argument:  Metastore on c6403.ambari.apache.org failed 
-> Argument:  this is in quotes
================END=================
{code}


Diffs
-----

  ambari-funtest/pom.xml b9c591f 
  ambari-project/pom.xml f19ca14 
  ambari-server/pom.xml b500fb2 
  ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java
092aaf4 
  ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java
3a88f37 
  ambari-server/src/main/java/org/apache/ambari/server/state/services/CachedAlertFlushService.java
72bf68a 
  ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcherTest.java
12141c9 

Diff: https://reviews.apache.org/r/43387/diff/


Testing
-------

Manually verified that script arguments for the affected alerts (hive and oozie) are correct
now

mvn clean test
Tests run: 3828, Failures: 0, Errors: 0, Skipped: 31

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:10 min
[INFO] Finished at: 2016-02-08T23:53:14-05:00
[INFO] Final Memory: 50M/727M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message