> On Oct. 5, 2015, 3:44 p.m., Andrew Onischuk wrote: > > ambari-server/src/main/package/rpm/postremove.sh, line 25 > > <https://reviews.apache.org/r/38806/diff/4/?file=1091077#file1091077line25> > > > > The same question for server. Why do we delete this folder. > > > > Shouldn't rpm automatically do that? > > Di Li wrote: > Hello Andrew, > > RPM is not removing the ambari_server dir from python2.6/site-packages. I > found that the ambari-server dir was left there with 16 pyc files in it. So > my think is that I should try to remove it in the postun script. > > P.S > RPM does remove ambari_agent dir from python2.6/sites-packages. > > Andrew Onischuk wrote: > Can we do the same fix for debian/ubuntu? (maybe by moving to > install-helper.sh)
Hello Andrew, I just moved the removing ambari_server from python2.6/site-packages logic from ambari server's postun script to the install-helper.sh. The change also removes the need of having postun for ambari server. Please review. Thanks. - Di ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38806/#review101482 ----------------------------------------------------------- On Oct. 5, 2015, 3:37 p.m., Di Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38806/ > ----------------------------------------------------------- > > (Updated Oct. 5, 2015, 3:37 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, and Sid > Wagle. > > > 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/conf/unix/install-helper.sh 35c67fb > ambari-server/conf/unix/install-helper.sh 9dbb2b8 > ambari-server/pom.xml 83f39ec > 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 > >
