> On March 18, 2016, 5:44 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/python/ambari_server/serverConfiguration.py, line 230 > > <https://reviews.apache.org/r/45041/diff/1/?file=1306262#file1306262line230> > > > > This is doing rstrip instead, if the original string contains leading > > "/" this needs to be, > > root = os.environ["ROOT"] > > root = ("/" + root.lstrip("/")) if root.startswith("/") else root > > Alejandro Fernandez wrote: > Why was this dropped? > > Vitalyi Brodetskyi wrote: > Because your code do not fix current problem. My code is fixing it > correctly. > Problem is in fact that ROOT has slash in the end and additional path has > slash on start, after concat these two paths, we are getting not valid path > like {root}//{additional path} > that's why i'm removing last slash in root and then concat it with > additional path. In ambari.properties we are always add additional path with > slash on start, so there is no critical need to add additional checks.
Thank you for explaining. I thought the path to be fixed was //var/lib/... - Alejandro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45041/#review124230 ----------------------------------------------------------- On March 18, 2016, 5:39 p.m., Vitalyi Brodetskyi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45041/ > ----------------------------------------------------------- > > (Updated March 18, 2016, 5:39 p.m.) > > > Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro > Sen. > > > Bugs: AMBARI-15483 > https://issues.apache.org/jira/browse/AMBARI-15483 > > > Repository: ambari > > > Description > ------- > > ambari-server setup command shows strange paths with double slashes in front: > Successfully installed JDK to //usr/jdk64/ > Downloading JCE Policy archive from > http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to > //var/lib/ambari-server/resources/jce_policy-8.zip > Successfully downloaded JCE Policy archive to > //var/lib/ambari-server/resources/jce_policy-8.zip > Installing JCE policy... > Completing setup... > Configuring database... > Enter advanced database configuration y/n ? > Configuring database... > Default properties detected. Using built-in database. > WARNING: Command chown None //etc/ambari-server/conf/password.dat returned > exit code //etc/ambari-server/conf/password.dat with message: chown: invalid > user: `None' > > > Diffs > ----- > > ambari-server/src/main/python/ambari_server/serverConfiguration.py 29187bd > > Diff: https://reviews.apache.org/r/45041/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Vitalyi Brodetskyi > >