You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Vitalyi Brodetskyi <vb...@hortonworks.com> on 2016/03/18 18:39:05 UTC

Review Request 45041: Strange paths in ambari-server setup

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45041/
-----------------------------------------------------------

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


Re: Review Request 45041: Strange paths in ambari-server setup

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> 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

Why was this dropped?


- 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
> 
>


Re: Review Request 45041: Strange paths in ambari-server setup

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.

> On Березень 18, 2016, 5:44 після полудня, 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?

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.


- Vitalyi


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45041/#review124230
-----------------------------------------------------------


On Березень 18, 2016, 5:39 після полудня, Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45041/
> -----------------------------------------------------------
> 
> (Updated Березень 18, 2016, 5:39 після полудня)
> 
> 
> 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
> 
>


Re: Review Request 45041: Strange paths in ambari-server setup

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> 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
> 
>


Re: Review Request 45041: Strange paths in ambari-server setup

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45041/#review124230
-----------------------------------------------------------




ambari-server/src/main/python/ambari_server/serverConfiguration.py (line 230)
<https://reviews.apache.org/r/45041/#comment186689>

    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


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
> 
>


Re: Review Request 45041: Strange paths in ambari-server setup

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45041/#review124233
-----------------------------------------------------------


Ship it!




Ship It!

- Andrew Onischuk


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
> 
>


Re: Review Request 45041: Strange paths in ambari-server setup

Posted by Sumit Mohanty <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45041/#review124231
-----------------------------------------------------------


Ship it!




Ship It!

- Sumit Mohanty


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
> 
>