----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55153/#review160504 -----------------------------------------------------------
Fix it, then Ship it! ambari-server/src/main/java/org/apache/ambari/server/checks/PreviousUpgradeCompleted.java (line 65) <https://reviews.apache.org/r/55153/#comment231643> formatting - Nate Cole On Jan. 3, 2017, 8:04 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55153/ > ----------------------------------------------------------- > > (Updated Jan. 3, 2017, 8:04 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 > ----- > > > 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/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 > >
