> On Sept. 1, 2017, 4:23 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > > Lines 611-617 (patched) > > <https://reviews.apache.org/r/61949/diff/3/?file=1810831#file1810831line611> > > > > This doesn't seem to be relevant - we already know that the stack > > contains services since the cluster has them. And I don't see "stack" > > being used after this. Can probably remove the @Inject'ed AmbariMetaInfo > > too.
`stack` variable is used to get available services at for (AvailableService availableService : desiredVersionDefinition.getAvailableServices(stack)) { - Dmitro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61949/#review184354 ----------------------------------------------------------- On Sept. 4, 2017, 6:39 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61949/ > ----------------------------------------------------------- > > (Updated Sept. 4, 2017, 6:39 p.m.) > > > Review request for Ambari, Dmytro Grinenko, Jonathan Hurley, and Nate Cole. > > > Bugs: AMBARI-21832 > https://issues.apache.org/jira/browse/AMBARI-21832 > > > Repository: ambari > > > Description > ------- > > Currently there is an odd scenario which can occur when patch repositories > are registered which have services not yet installed. Consider the following > scenario: > > - Install ZooKeeper, Storm on HDP 2.6.0.0-1234 > - Register/patch a {{PATCH}} VDF for Storm and Accumulo for 2.6.0.1-9999 > - Install Accumulo > > Which version does Accumulo use - the {{STANDARD}} repository or the > {{PATCH}}? If the {{PATCH}} repository is chosen, this will now prevent > reversion of the patch since there's no prior version for Accumulo to revert > back to. > > If Accumulo uses the {{STANDARD}} repo, then there needs to be a lot of > design and UX flow work provided to indicate that a {{PATCH}} which was > previously applied can be re-applied for the new service. This also causes > problems for patch reversion since now there would be two upgrades which need > to be reverted to "get rid" of the patch. > > For the timeframe for Ambari 2.6, we should reject VDFs that include services > which are not installed. This will prevent the problem. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > 7a53e91bb0 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java > 282f159a66 > > > Diff: https://reviews.apache.org/r/61949/diff/4/ > > > Testing > ------- > > mvn clean test > > UI misbehaves when VDF validation triggers error. Will open a UI jira for that > > > Thanks, > > Dmitro Lisnichenko > >