> On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, > > line 373 > > <https://reviews.apache.org/r/28753/diff/3/?file=783802#file783802line373> > > > > The initial state should instead be UPGRADING.
As of now, we have no means to handle successful command report after installing packages/repositories, so we have no trigger to transition UPGRADING to INSTALLED state. To allow UI team to implement end to end process (with few skipped steps), for now we don't follow custom action status and create cluster repo version in already in INSTALLED state. I'll change it to INIT in next patches. Also, UPGRADING is not valid value right after cluster stack version creation. We have a UI requirement that creation of cluster stack version does not trigger immediate installation of packages/repositories. That should be a separate request (PUT). > On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, > > line 204 > > <https://reviews.apache.org/r/28753/diff/3/?file=783802#file783802line204> > > > > The bootstrap should now create a repo version. > > e.g., stack is HDP-2.2 and repository_version is 2.2 > > > > So the exception handling is not needed. At least on trunk build I tested, after bootstrap we had cluster stack version with stack "HDP" and (repo) version "2.2". It did not match any repository version. I'll double-check that and remove this handling if it is not needed anymore. > On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, > > line 204 > > <https://reviews.apache.org/r/28753/diff/3/?file=783802#file783802line204> > > > > This can now be removed since bootstrapping inserts a > > RepositoryVersion, e.g., stack is HDP-2.2 and version is 2.2 At least on trunk build I tested, after bootstrap we had cluster stack version with stack "HDP" and (repo) version "2.2". It did not match any repository version. I'll double-check that and remove this handling if it is not needed anymore. > On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, > > line 373 > > <https://reviews.apache.org/r/28753/diff/3/?file=783802#file783802line373> > > > > The initial state should be UPGRADING since a stack version cannot jump > > directly into INSTALLED. > > > > If the UI is using INSTALLED as a way to create dummy data, I suggest > > folks insert the data manually through the DB so that this code can > > lock-down. It has been done to help UI folks. Also, according to current design, new cluster stack version should be in INIT state. > On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java, > > line 213 > > <https://reviews.apache.org/r/28753/diff/3/?file=783803#file783803line213> > > > > Not needed any longer. Please see the comment above > On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java, > > line 213 > > <https://reviews.apache.org/r/28753/diff/3/?file=783803#file783803line213> > > > > Can now remove the exception handling. Please see the comment above > On Dec. 5, 2014, 7:51 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java, > > line 1213 > > <https://reviews.apache.org/r/28753/diff/3/?file=783806#file783806line1213> > > > > Again, INSTALLED should not be an acceptable start state. Please see the comment above - Dmitro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28753/#review64038 ----------------------------------------------------------- On Dec. 5, 2014, 5:35 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28753/ > ----------------------------------------------------------- > > (Updated Dec. 5, 2014, 5:35 p.m.) > > > Review request for Ambari, Alejandro Fernandez and Nate Cole. > > > Bugs: AMBARI-8549 > https://issues.apache.org/jira/browse/AMBARI-8549 > > > Repository: ambari > > > Description > ------- > > for now cluster stack version resource contains all created repository > versions: (repo version filtering does not work correctly) > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java > 97d3bde > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > a12bd29 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java > 1b3eef8 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java > c031ac1 > ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java > 125b71b > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > 5a9731a > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java > 0e8269f > > Diff: https://reviews.apache.org/r/28753/diff/ > > > Testing > ------- > > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Views ...................................... SUCCESS [3.225s] > [INFO] Ambari Server ..................................... SUCCESS > [27:27.658s] > [INFO] Ambari Agent ...................................... SUCCESS [8.468s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 27:40.036s > [INFO] Finished at: Fri Dec 05 20:29:41 FET 2014 > [INFO] Final Memory: 33M/323M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Dmitro Lisnichenko > >
