> On Oct. 1, 2015, 4:48 p.m., Alejandro Fernandez wrote:
> > ambari-agent/src/main/package/rpm/postremove.sh, line 27
> > <https://reviews.apache.org/r/38806/diff/1/?file=1085915#file1085915line27>
> >
> >     This will depend on the default Python installed. However, if Ambari 
> > detects both 2.6 and 2.7, I believe it will prefer 2.6, yet this code will 
> > return the path for 2.7.
> >     
> >     Can you test this with Python 2.6, 2.7, and both?
> >     
> >     If that is indeed the case, we need to make this pick the same version 
> > of python that Ambari uses in ambari-python-wrap. We need a way for this 
> > file and ambari-python-wrap to pick the same version.
> >     
> >     You can also remove ambari agent from all of the versions of python 
> > installed.

postinstall script used by Ambari server and agent calls "install-helper.sh" to 
set up symbolic links in /usr/lib/python2.6/site-packages. The 
install-helper.sh script actually hard codes the site-packages location to be 
"/usr/lib/python2.6/site-packages". In other words, for a host with only Python 
2.7, the Ambari server/agent RPM install will create 
/usr/lib/python2.6/site-packages and then create symbolic links in it.

Changed the postuninstall script to also use /usr/lib/python2.6/site-packages 
in order to be consistent.


> On Oct. 1, 2015, 4:48 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/package/rpm/postremove.sh, line 27
> > <https://reviews.apache.org/r/38806/diff/1/?file=1085917#file1085917line27>
> >
> >     Same comment as above.

postinstall script used by Ambari server and agent calls "install-helper.sh" to 
set up symbolic links in /usr/lib/python2.6/site-packages. The 
install-helper.sh script actually hard codes the site-packages location to be 
"/usr/lib/python2.6/site-packages". In other words, for a host with only Python 
2.7, the Ambari server/agent RPM install will create 
/usr/lib/python2.6/site-packages and then create symbolic links in it.

Changed the postuninstall script to also use /usr/lib/python2.6/site-packages 
in order to be consistent.


- Di


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


On Sept. 28, 2015, 12:48 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38806/
> -----------------------------------------------------------
> 
> (Updated Sept. 28, 2015, 12:48 p.m.)
> 
> 
> Review request for Ambari and Alejandro Fernandez.
> 
> 
> Bugs: AMBARI-13242
>     https://issues.apache.org/jira/browse/AMBARI-13242
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The uninstall script in RPM does not clean up the symbolic links created in 
> /usr/lib/python2.6/site-packages. The broken links causes following err if 
> user tries to install Ambari server on a node that has been previously 
> installed with Ambari agent. Vise Versa.
> 
> File "/usr/sbin/ambari-server.py", line 26, in <module>
> from ambari_commons.exceptions import FatalException, NonFatalException
> File "/usr/lib/python2.6/site-packages/ambari_commons/_init_.py", line 21, in 
> <module>
> File "/usr/lib/python2.6/site-packages/ambari_commons/os_check.py", line 133, 
> in <module>
> File "/usr/lib/python2.6/site-packages/ambari_commons/os_check.py", line 115, 
> in _init_
> File "/usr/lib/python2.6/site-packages/ambari_commons/os_check.py", line 112, 
> in initialize_data
> 
> 
> Diffs
> -----
> 
>   ambari-agent/pom.xml 0096162 
>   ambari-agent/src/main/package/rpm/postremove.sh PRE-CREATION 
>   ambari-server/pom.xml 3377961 
>   ambari-server/src/main/package/rpm/postremove.sh PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38806/diff/
> 
> 
> Testing
> -------
> 
> Generate Ambari Server and Agent RPMs
> Install the Ambari Agent RPM on a machine
> Run yum erase to remove the Ambari Agent RPM > verify the symbolic links in 
> /usr/lib/python2.6/site-packages are removed. 
> On the very same machine, now install Ambari Server RPM > verify the RPM 
> install is successful, and can start/stop Ambari server.
> Run yum erase to remove the Ambari Server RPM > verify the symbolic links in 
> /usr/lib/python2.6/site-packages are removed.
> 
> 
> Thanks,
> 
> Di Li
> 
>

Reply via email to