> On April 24, 2015, 7:10 p.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java, > > lines 136-144 > > <https://reviews.apache.org/r/33534/diff/1/?file=941305#file941305line136> > > > > I might be good to doc how this snippet behaves in the 4 scenarios: > > 2.2->2.2 Upgrade/Downgrade and 2.2-2.3 Upgrade/Downgrade ... took me a > > while to run through the options in my head. > > > > Also, why is `targetStack.equals(configStack)` needed? This code is > > only run when upgrading from 2.2 to 2.3 ... does it also need to run when > > downgrading from 2.2 to 2.2?
It's just extra protection to make sure that the config is really for the target stack. If there's ever a discrepancy between them, then this code shouldn't run. - Nate ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33534/#review81566 ----------------------------------------------------------- On April 24, 2015, 5:17 p.m., Nate Cole wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33534/ > ----------------------------------------------------------- > > (Updated April 24, 2015, 5:17 p.m.) > > > Review request for Ambari, Alejandro Fernandez and Jonathan Hurley. > > > Bugs: AMBARI-10739 > https://issues.apache.org/jira/browse/AMBARI-10739 > > > Repository: ambari > > > Description > ------- > > The ConfigureAction that is used in the rolling upgrade process blindly > creates new configurations for every single change that is listed in the > upgrade pack. This needs to change in two fundamental ways: > > - When upgrading or downgrading within a stack version (hdp-2.2.x.x to > hdp-2.2.y.y), before making a new configuration with the value from the > upgrade pack, compare the value to the current value. If they are the same, > do no work > > - When upgrading across stack versions (hdp-2.2 to hdp-2.3), new > configurations are already being created. There is no need to create new > configurations since the upgrade has already done this. The desired > configurations should simply be modified with the new values. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java > 6154f5b > ambari-server/src/main/java/org/apache/ambari/server/state/Config.java > 7eeea7d > ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java > 4a62ff6 > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java > 40a1db2 > > ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java > fc86c7a > > Diff: https://reviews.apache.org/r/33534/diff/ > > > Testing > ------- > > Manual + automated > > Tests run: 2882, Failures: 0, Errors: 0, Skipped: 17 > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 29:15.451s > [INFO] Finished at: Fri Apr 24 17:11:00 EDT 2015 > [INFO] Final Memory: 41M/608M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Nate Cole > >
