Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 532A618FBC for ; Tue, 23 Jun 2015 02:53:39 +0000 (UTC) Received: (qmail 99287 invoked by uid 500); 23 Jun 2015 02:53:39 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 99252 invoked by uid 500); 23 Jun 2015 02:53:39 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 99237 invoked by uid 99); 23 Jun 2015 02:53:38 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2015 02:53:38 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 236D21DFFFE; Tue, 23 Jun 2015 02:53:38 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6137184412497188767==" MIME-Version: 1.0 Subject: Re: Review Request 35764: Installing Repo Packages needs to be more robust to handle the actual_version installed when the script is killed because of a timeout From: "Alejandro Fernandez" To: "Nate Cole" , "Dmitro Lisnichenko" , "Jonathan Hurley" Cc: "Alejandro Fernandez" , "Ambari" Date: Tue, 23 Jun 2015 02:53:38 -0000 Message-ID: <20150623025338.3113.12839@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Alejandro Fernandez" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/35764/ X-Sender: "Alejandro Fernandez" References: <20150623025154.3113.92751@reviews.apache.org> In-Reply-To: <20150623025154.3113.92751@reviews.apache.org> Reply-To: "Alejandro Fernandez" X-ReviewRequest-Repository: ambari --===============6137184412497188767== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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) Unrelated bug that I needed to fix. ambari-server/src/main/resources/custom_actions/scripts/install_packages.py (line 164) 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 > > --===============6137184412497188767==--