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 50701178BB for ; Thu, 11 Jun 2015 12:17:44 +0000 (UTC) Received: (qmail 78870 invoked by uid 500); 11 Jun 2015 12:17:44 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 78830 invoked by uid 500); 11 Jun 2015 12:17:44 -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 78815 invoked by uid 99); 11 Jun 2015 12:17:43 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2015 12:17:43 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 84CA61DD59C; Thu, 11 Jun 2015 12:17:43 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6405962750327384238==" MIME-Version: 1.0 Subject: Review Request 35352: AMBARI-11810: Rolling upgrade does not run pre-upgrade checks against non-HDP stack From: "Di Li" To: "Alejandro Fernandez" Cc: "Di Li" , "Ambari" Date: Thu, 11 Jun 2015 12:17:43 -0000 Message-ID: <20150611121743.1530.26520@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Di Li" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/35352/ X-Sender: "Di Li" Reply-To: "Di Li" X-ReviewRequest-Repository: ambari --===============6405962750327384238== 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/35352/ ----------------------------------------------------------- Review request for Ambari and Alejandro Fernandez. Bugs: AMBARI-11810 https://issues.apache.org/jira/browse/AMBARI-11810 Repository: ambari Description ------- All the rolling upgrade pre-checks may still need to run against a non-HDP stack. Use this JIRA to make the check runnable based on properties (rollingupgrade.stack, rollingupgrade.version) set in the /etc/ambari-server/conf/ambari.properties. Still default to HDP and 2.2.4.2 if the properties do not exist. org.apache.ambari.server.checks.AbstractCheckDescriptor compares stack against hardcoded StackInfo "HDP-2.2". the stack name and version info can be externalized into the /etc/ambari-server/conf/ambar.properties in order to support non-HDP stacks. Diffs ----- ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java 8cabf29 ambari-server/src/test/java/org/apache/ambari/server/checks/AbstractCheckDescriptorTest.java 4834cee Diff: https://reviews.apache.org/r/35352/diff/ Testing ------- Added new unit tests Manually tested the fix by kicking off the rolling upgrade 1. With no properties in /etc/ambari-server/conf/ambari.properties, Java code used the default HDP-2.2 StackId information and performed the upgrade pre-checks. 2. With wrong property values in ambari.properties, Java code threw err about the StackId did not match 3. With correct property values in ambari.properties, Java code used the stack id and performed the upgrade pre-checks. Thanks, Di Li --===============6405962750327384238==--