> On Dec. 4, 2017, 4:20 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/bootstrap/SshHostInfo.java > > Lines 130-132 (patched) > > <https://reviews.apache.org/r/64242/diff/1/?file=1905504#file1905504line130> > > > > How many URLs are we talking about here. If more than one, should this > > bet a Set? > > Sonia Garudi wrote: > ambariRepoUrls is a json string having ambari repo URLs for each os type > which is sent from the UI. > > Nate Cole wrote: > Can I see an example? > > Sonia Garudi wrote: > Example : > > "[{"os_type":"os1","ambari_repo":"http://ambari-repo1","hosts":["host1","host2"],"ambariRepoUIError":"","hasError":false},{"os_type":"os2","ambari_repo":"http://ambari-repo2","hosts":["host3"],"ambariRepoUIError":"","hasError":false}]" > The above json string consists of list of 2 objects; each containing the > os_type, ambari repository URL and the list of host names for the > corresponding os_type. The 2 other fields(i.e. ambariRepoUIError and > hasError) are used for UI validation. > > Nate Cole wrote: > This seems strange in that we end up with two different ways to "get" the > URL. One is that when the UI does not recognize an OS, we ask for it and > (presumably) save it in ambari.properties. Seems as though when we should > always get the value from ambari.properties and fail if it's not there. > Also, why are we setting all this information If we have a command for > host1, host2, why would we need to know that os-type-2 goes on host3? > > Sonia Garudi wrote: > The bootstrap.py file first checks if the os type of a host is not same > as server os type. If its different it checks for the ambari repo property > for that os type in the ambari.properties file. > case 1 : If the property is not found, the bootstrap for that host fails > with code 44. The UI prompts for the ambari repo URL for os_type of hosts > which fail with code 44. These hosts are bootstrapped with the ambariRepoUrls > json string which contains the ambari repo urls. These URLs are then saved in > the ambari.properties file for the respective os type. > case 2 : If the property is found in the properties file, the > installation will continue without showing a prompt for that os_type. > > The hosts field in each object is used for removal of prompt when a host > is removed. > Implementation of storing of ambari repo url in properties file in done > in upcoming patches.
Hi Nate, Sonia just dumped the data structure used on step3 controller to the bootstrap API, hence it contains the hostnames, but at server side only os_type and corresponding repo URL is used. We can just do away with hosts information in the json data which would look like below: [{"os_type":"os1","ambari_repo":"http://ambari-repo1"},{"os_type":"os2","ambari_repo":"http://ambari-repo2"}]" Let us know if you really need to change this in this patch or we could change it in next patch (AMBARI-22394). - Yussuf ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64242/#review192705 ----------------------------------------------------------- On Dec. 1, 2017, 7:47 a.m., Sonia Garudi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64242/ > ----------------------------------------------------------- > > (Updated Dec. 1, 2017, 7:47 a.m.) > > > Review request for Ambari and Nate Cole. > > > Bugs: AMBARI-22476 > https://issues.apache.org/jira/browse/AMBARI-22476 > > > Repository: ambari > > > Description > ------- > > The hosts failing with error code 44 are bootstrapped along with the ambari > repository URLs. The required java beans are changed to include the ambari > repository URLs to be passed to bootstrap.py. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java > c7976ee5bb48209478258625532e3420973b4b8c > > ambari-server/src/main/java/org/apache/ambari/server/bootstrap/SshHostInfo.java > 86888f499f15aa23807067ee1af745525b9d4619 > ambari-server/src/main/python/bootstrap.py > f1c53ce45316843fd38624536eed656b029a230a > > ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java > b9da013524fee556c6faa2f0236d2c0c4b032750 > ambari-server/src/test/python/TestBootstrap.py > bea47f498cbb523fbe24622c63b48918d433c717 > ambari-web/app/controllers/wizard/step3_controller.js > 5ff2cdc1b4bb9da20565fe387765b4fc6728e096 > ambari-web/test/controllers/wizard/step3_test.js > be1affe28fdcdb3404ebd3fb3fc6e61315483ed2 > > > Diff: https://reviews.apache.org/r/64242/diff/1/ > > > Testing > ------- > > Tests were successful in ambari-web and ambari-server. > > > Thanks, > > Sonia Garudi > >