----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43946/#review120534 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListener.java (line 167) <https://reviews.apache.org/r/43946/#comment181999> You can use == for enum comparisons - Jonathan Hurley On Feb. 24, 2016, 10:56 a.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43946/ > ----------------------------------------------------------- > > (Updated Feb. 24, 2016, 10:56 a.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-15161 > https://issues.apache.org/jira/browse/AMBARI-15161 > > > Repository: ambari > > > Description > ------- > > If the database shows a {{VERSION_MISMATCH}} for a host component, correcting > this component doesn't set the data back: > > {code:title=hostcomponentstate} > 1 2 ZOOKEEPER_CLIENT 2.4.0.0-86 3 INSTALLED > 1 ZOOKEEPER NONE UNKNOWN > 2 2 ZOOKEEPER_SERVER 2.4.0.0-86 4 STARTED 1 > ZOOKEEPER NONE UNSECURED > 3 2 ZOOKEEPER_SERVER 2.4.0.0-86 4 STARTED 2 > ZOOKEEPER NONE UNSECURED > 4 2 ZOOKEEPER_CLIENT 2.4.0.0-86 3 INSTALLED > 2 ZOOKEEPER NONE UNKNOWN > 5 2 ZOOKEEPER_SERVER 2.4.0.0-86 4 STARTED 3 > ZOOKEEPER VERSION_MISMATCH UNSECURED > {code} > > Notice that there is a {{ZOOKEEPER_SERVER}} which has had it's version > corrected back to {{2.4.0.0-86}} but still shows as {{VERSION_MISMATCH}} > > STR: > 1) Stop ZK on a host > 2) {{hdp-select}} to another version > 3) Start ZK > 4) After {{VERSION_MISMATCH}}, stop it again, flip it back, and start it > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListener.java > e2a7795 > ambari-server/src/main/java/org/apache/ambari/server/state/State.java > 78af13f > > Diff: https://reviews.apache.org/r/43946/diff/ > > > Testing > ------- > > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Views ...................................... SUCCESS [3.086s] > [INFO] Ambari Metrics Common ............................. SUCCESS [2.050s] > [INFO] Ambari Server ..................................... SUCCESS > [1:06:21.270s] > [INFO] Ambari Agent ...................................... SUCCESS [8.295s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 1:06:36.962s > [INFO] Finished at: Wed Feb 24 17:34:01 EET 2016 > [INFO] Final Memory: 73M/980M > [INFO] > ------------------------------------------------------------------------ > > > First test run failed once with > > UpgradeActionTest.testFinalizeDowngradeAcrossStacks:784 null > > UpgradeActionTest.testFinalizeWithHostsAlreadyCurrent:619->makeUpgradeCluster:329 > expected:<1> but was:<2> > ClusterTest.testTransitionHostVersionAdvanced:1818 null > > but successive test runs both from IDE and from console did not reproduce > that. Maybe my mistake during first run > > > Thanks, > > Dmitro Lisnichenko > >
