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

(Updated April 12, 2016, 8:38 p.m.)


Review request for Ambari, Dmytro Grinenko, Jonathan Hurley, Sumit Mohanty, and 
Sid Wagle.


Changes
-------

Create the missing parameterized alerts.


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


Repository: ambari


Description
-------

AMBARI-15815: Direct Ambari Upgrade from 2.0.1 to 2.4.x  failed with error

** Issue **:
When upgrading from ambari 2.0.1 to 2.4.0, upgrade fails with 
NullPointerException.

This is because in alert_definition table, *ambari_agent_disk_usage* type is 
missing the following parameters in the alert source:
** percent.free.space.critical.threshold **
** percent.used.space.warning.threshold **

java.lang.NullPointerException
at 
org.apache.ambari.server.upgrade.UpgradeCatalog240.updateAlerts(UpgradeCatalog240.java:497)
at 
org.apache.ambari.server.upgrade.UpgradeCatalog240.executeDMLUpdates(UpgradeCatalog240.java:180)

** Fix **:
Verify if float value is not available, before trying to convert it to 
percentage value.


Diffs (updated)
-----

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 31af5e3 

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


Testing
-------

** 1. mvn clean install **

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ....................................... SUCCESS [7.453s]
[INFO] Apache Ambari Project POM ......................... SUCCESS [0.039s]
[INFO] Ambari Web ........................................ SUCCESS [24.974s]
[INFO] Ambari Views ...................................... SUCCESS [1.005s]
[INFO] Ambari Admin View ................................. SUCCESS [7.226s]
[INFO] ambari-metrics .................................... SUCCESS [0.355s]
[INFO] Ambari Metrics Common ............................. SUCCESS [0.449s]
[INFO] Ambari Metrics Hadoop Sink ........................ SUCCESS [1.006s]
[INFO] Ambari Metrics Flume Sink ......................... SUCCESS [0.553s]
[INFO] Ambari Metrics Kafka Sink ......................... SUCCESS [0.589s]
[INFO] Ambari Metrics Storm Sink ......................... SUCCESS [1.459s]
[INFO] Ambari Metrics Collector .......................... SUCCESS [6.242s]
[INFO] Ambari Metrics Monitor ............................ SUCCESS [1.683s]
[INFO] Ambari Metrics Grafana ............................ SUCCESS [0.934s]
[INFO] Ambari Metrics Assembly ........................... SUCCESS [1:17.665s]
[INFO] Ambari Server ..................................... SUCCESS [2:26.545s]
[INFO] Ambari Functional Tests ........................... SUCCESS [1.125s]
[INFO] Ambari Agent ...................................... SUCCESS [22.799s]
[INFO] Ambari Client ..................................... SUCCESS [0.057s]
[INFO] Ambari Python Client .............................. SUCCESS [0.860s]
[INFO] Ambari Groovy Client .............................. SUCCESS [1.996s]
[INFO] Ambari Shell ...................................... SUCCESS [0.046s]
[INFO] Ambari Python Shell ............................... SUCCESS [0.659s]
[INFO] Ambari Groovy Shell ............................... SUCCESS [0.851s]
[INFO] ambari-logsearch .................................. SUCCESS [0.086s]
[INFO] Ambari Logsearch Portal ........................... SUCCESS [35.525s]
[INFO] Ambari Logsearch Log Feeder ....................... SUCCESS [29.153s]
[INFO] Ambari Logsearch Appender ......................... SUCCESS [1.606s]
[INFO] Ambari Logsearch Assembly ......................... SUCCESS [0.075s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:13.709s
[INFO] Finished at: Mon Apr 11 16:00:34 PDT 2016
[INFO] Final Memory: 272M/1173M
[INFO] ------------------------------------------------------------------------

** 2. mvn test -Dtest=UpgradeCatalog240Test -DskipPythonTests **

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Picked up _JAVA_OPTIONS: -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true
Running org.apache.ambari.server.upgrade.UpgradeCatalog240Test
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.93 sec - in 
org.apache.ambari.server.upgrade.UpgradeCatalog240Test

Results :

Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.843s
[INFO] Finished at: Mon Apr 11 15:53:33 PDT 2016
[INFO] Final Memory: 56M/1024M
[INFO] ------------------------------------------------------------------------

** 3. Manual test **
* Install ambari 2.0.1 and deploy HDFS, YARN, MAPREDUCE2, AMS and RANGER
* Update the repo file to latest from trunk
* yum upgrade ambari-server
* Overwrite ambari-server JAR with the one from the local build
* Run **ambari-server upgrade**
* Verified that the upgrade succeeded.


Thanks,

Nahappan Somasundaram

Reply via email to