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 E70AC18D0B for ; Wed, 9 Dec 2015 05:32:35 +0000 (UTC) Received: (qmail 79462 invoked by uid 500); 9 Dec 2015 05:32:35 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 79422 invoked by uid 500); 9 Dec 2015 05:32:35 -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 79404 invoked by uid 99); 9 Dec 2015 05:32:35 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2015 05:32:35 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id EEFBE291A4F; Wed, 9 Dec 2015 05:32:34 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0783689193661405263==" MIME-Version: 1.0 Subject: Re: Review Request 41115: AMBARI-14281. EU/RU can fail if register a repo without a build number that already exists, add PreCheck From: "Dmytro Grinenko" To: "Swapan Shridhar" , "Nate Cole" , "Dmitro Lisnichenko" , "Dmytro Grinenko" , "Jonathan Hurley" Cc: "Ambari" , "Alejandro Fernandez" Date: Wed, 09 Dec 2015 05:32:34 -0000 Message-ID: <20151209053234.1619.34871@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Dmytro Grinenko" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/41115/ X-Sender: "Dmytro Grinenko" References: <20151209022733.1618.79011@reviews.apache.org> In-Reply-To: <20151209022733.1618.79011@reviews.apache.org> Reply-To: "Dmytro Grinenko" X-ReviewRequest-Repository: ambari --===============0783689193661405263== 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/41115/#review109453 ----------------------------------------------------------- ambari-server/src/main/java/org/apache/ambari/server/checks/InstallPackagesCheck.java (line 64) but this doesn't check format x.x.x- (i.e. "-" is leading), or x.x-x.x.x, or x.x-x-x-x Possibly we need to have some "central" place to verify/parse version input like in python scripts or some class which will be able to initialize from different formats? This should help to stop the hell with version formats available in the ambari, same like the time when we change version convension - Dmytro Grinenko On Dec. 9, 2015, 2:27 a.m., Alejandro Fernandez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41115/ > ----------------------------------------------------------- > > (Updated Dec. 9, 2015, 2:27 a.m.) > > > Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, and Swapan Shridhar. > > > Bugs: AMBARI-14281 > https://issues.apache.org/jira/browse/AMBARI-14281 > > > Repository: ambari > > > Description > ------- > > If a cluster has version x (e.g., HDP 2.3.2.0-2950) as CURRENT, and the user registers a Repository Version such as 2.3.xx that uses different build URLs but results in the same build number, then installing packages will be a no-op. > This means that no new version will be detected using the "deltas" method and the repo_version entity will keep the "version" field without a build number, and the Cluster Version entity will transition into INSTALLED (since technically it is already installed). > > This incorrect setup will allow the user to start a RU/EU, which will immediately fail since the Repo Version has no build number, which is needed by hdp-select. > > The fix is to add a PreCheck that ensures that all repos contain a build number. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/checks/InstallPackagesCheck.java 15b6140 > ambari-server/src/test/java/org/apache/ambari/server/checks/InstallPackagesCheckTest.java 56aa1f3 > > Diff: https://reviews.apache.org/r/41115/diff/ > > > Testing > ------- > > mvn clean test > Tested that a build must contain a build number before starting RU/EU. > > > Thanks, > > Alejandro Fernandez > > --===============0783689193661405263==--