> On May 1, 2017, 7:13 p.m., Gaurav Nagar wrote: > > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java > > Lines 1012 (patched) > > <https://reviews.apache.org/r/58886/diff/1/?file=1704055#file1704055line1012> > > > > I think, this will be called for each auto instance. > > Shouldn't we call this before installAutoInstance, so that it will > > execute only once.
Should not be a problem, as we are thinking of another better way for next release. If I take it out then the code will spread to multiple places. > On May 1, 2017, 7:13 p.m., Gaurav Nagar wrote: > > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java > > Lines 1050 (patched) > > <https://reviews.apache.org/r/58886/diff/1/?file=1704055#file1704055line1050> > > > > You need to check if viewInstance's clusterType is LOCAL_AMBARI and > > Id's not contails in list. > > Otherwise it will delete REMOTE_AMBARI configured instances. Ok will do this check and update the patch. - Nitiraj ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58886/#review173491 ----------------------------------------------------------- On May 1, 2017, 6:57 p.m., Nitiraj Rathore wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58886/ > ----------------------------------------------------------- > > (Updated May 1, 2017, 6:57 p.m.) > > > Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav > Kulshreshtha, Rohit Choudhary, venkat sairam, and Ashwin Rajeev. > > > Bugs: AMBARI-20905 > https://issues.apache.org/jira/browse/AMBARI-20905 > > > Repository: ambari > > > Description > ------- > > If installation fails and is retried the cluster id changes but some view > instances keep older cluster ids which stop views from being displayed later > on. > remove the view instances which contains invalid cluster id before creating > any autoview instance. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java > 061c7223d6 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java > b632c54043 > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java > 24eceb21c6 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java > 25afe92ce4 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java > 8836af6ead > > ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java > a3728d46b3 > > > Diff: https://reviews.apache.org/r/58886/diff/1/ > > > Testing > ------- > > updated testcases where ever needed. Manual testing also done. > > > Thanks, > > Nitiraj Rathore > >
