-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51601/
-----------------------------------------------------------
(Updated Sept. 5, 2016, 5:49 p.m.)
Review request for Ambari, Alejandro Fernandez, Jayush Luniya, and Vitalyi
Brodetskyi.
Bugs: AMBARI-18305
https://issues.apache.org/jira/browse/AMBARI-18305
Repository: ambari
Description
-------
>From customer case:
We are trying upgrade Ambari from 2.2.2 to Ambari 2.4 with the latest packages
(1226).
https://issues.apache.org/jira/browse/AMBARI-15947 - "Upgrading Ambari should
delete any pyc files"
The patch contains the following two lines
{code}
AMBARI_SERVER="${ROOT}/usr/lib/python2.6/site-packages/ambari_server"
find $AMBARI_SEVER/ -name *.pyc -exec rm {} \;
{code}
The AMBARI_SEVER typo basically executes "find / -name *.pyc -exec rm {} \;"
on the root directory and deletes ALL pyc files from the ambari server machine.
This looks like a bug in the latest Ambari package we released yesterday.
Considering the command has both "rm" and "*" in the same line, lets see if we
can use a safer strategy such as changing the CWD and then deleting files.
Diffs
-----
ambari-agent/conf/unix/install-helper.sh 3614659
ambari-server/conf/unix/install-helper.sh 369a56a
Diff: https://reviews.apache.org/r/51601/diff/
Testing
-------
mvn clean test
Thanks,
Dmitro Lisnichenko