----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35764/#review88908 -----------------------------------------------------------
ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py (line 55) <https://reviews.apache.org/r/35764/#comment141526> Unrelated bug that I needed to fix. ambari-server/src/main/resources/custom_actions/scripts/install_packages.py (line 164) <https://reviews.apache.org/r/35764/#comment141528> I decided to use the file because there is no guarantee that the structured out will eventually make it to the request, and the server will accept it. Robustness! - Alejandro Fernandez On June 23, 2015, 2:51 a.m., Alejandro Fernandez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35764/ > ----------------------------------------------------------- > > (Updated June 23, 2015, 2:51 a.m.) > > > Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole. > > > Bugs: AMBARI-12083 > https://issues.apache.org/jira/browse/AMBARI-12083 > > > Repository: ambari > > > Description > ------- > > When installing bits of a new repo to perform an RU, if the repo version does > not contain a build number, then the actual_version has to be calculated. > The problem is that this information can only be retrieved by calculating the > delta of the versions when calling "hdp-select versions", so the only the > first time will return a value. If the script is killed, then the > actual_version will never be calculated and returned to the server. > > For this reason, the package installer must tolerate receiving a SIGINT or > SIGTERM, and calculate the actual_version. Further, it helps to store it in a > file, in case that the response or something upstream results in another > failure. > > > Diffs > ----- > > > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py > bb3faaa > > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode_upgrade.py > 5f7ac90 > ambari-server/src/main/resources/custom_actions/scripts/install_packages.py > ffe9815 > > Diff: https://reviews.apache.org/r/35764/diff/ > > > Testing > ------- > > Verified that the following works by decreasing the install package timeout > to 150 secs, and trying the following combinations > > Repo version including build number: > * Failure during installing the first package. Because actual_version was > already set, did not need to call "hdp-select versions". > * Failure after installing the first package, retries eventually passed. > > Repo version without build numbner: > * Failure during installing the first package. Because actual_version was > none, it tried calling "hdp-select versions" but the newer version was not > yet installed, so was allowed to retry. > * Failure after installing the first package. Beacuse "hdp-select versions" > reported a value in the delta, it was saved to the text file. Since it timed > out, was allowed to retry. > * Eventually, it passed. > > > Still need to fix unit tests. > > > Thanks, > > Alejandro Fernandez > >