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

(Updated Jan. 4, 2017, 12:19 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Nate Cole.


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


Repository: ambari


Description
-------

Due to the fix made for 
AMBARI-19053, the prereq check for previously created needs to be corrected for 
determining the downgrade that matched the failed upgrade.

The original logic for this check was overly complex (and kind of wrong). It 
ignored the state of the downgrade if one existed. In reality, we should care 
about the "last" downgrade and what its state is. Additionally, checking for 
`FinalizeUpgradeAction` as part of the commands in an upgrade is problematic 
for upgrades which may not have this command on different stacks.


Diffs (updated)
-----

  
ambari-server/src/main/java/org/apache/ambari/server/checks/PreviousUpgradeCompleted.java
 ff82750 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 67be152 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/UpgradeDAO.java 
2d0a4d7 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 86ba1a1 
  
ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/host-ordered-upgrade.xml
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/checks/PreviousUpgradeCompletedTest.java
 ab8da1b 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
 1861c0e 
  
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UpgradeDAOTest.java
 cc49cbd 

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


Testing
-------

Manually tested:
- No prior upgrades
- Existing upgrade in progress
- Existing upgrade holding
- Existing upgrade suspended
- Aborted upgrade via API without a downgrade
- Existing downgrade
- Full upgrade and full downgrade

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27:03 min
[INFO] Finished at: 2017-01-03T18:23:59-05:00
[INFO] Final Memory: 65M/736M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley

Reply via email to