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 7EB54100FA for ; Thu, 20 Feb 2014 18:51:27 +0000 (UTC) Received: (qmail 27463 invoked by uid 500); 20 Feb 2014 18:39:17 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 27424 invoked by uid 500); 20 Feb 2014 18:39:12 -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 27372 invoked by uid 99); 20 Feb 2014 18:39:08 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Feb 2014 18:39:00 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B03AA1D490E; Thu, 20 Feb 2014 18:38:57 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0145923864911567859==" MIME-Version: 1.0 Subject: Re: Review Request 18211: Actual configs not updated after restart of host component From: "Sid Wagle" To: "Nate Cole" , "Sid Wagle" Cc: "Dmytro Sen" , "Ambari" Date: Thu, 20 Feb 2014 18:38:57 -0000 Message-ID: <20140220183857.29785.24515@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Sid Wagle" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/18211/ X-Sender: "Sid Wagle" References: <20140219181431.29785.72583@reviews.apache.org> In-Reply-To: <20140219181431.29785.72583@reviews.apache.org> Reply-To: "Sid Wagle" X-ReviewRequest-Repository: ambari --===============0145923864911567859== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18211/#review35033 ----------------------------------------------------------- Ship it! Ship It! - Sid Wagle On Feb. 19, 2014, 6:14 p.m., Dmytro Sen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18211/ > ----------------------------------------------------------- > > (Updated Feb. 19, 2014, 6:14 p.m.) > > > Review request for Ambari, Nate Cole and Sid Wagle. > > > Bugs: AMBARI-4708 > https://issues.apache.org/jira/browse/AMBARI-4708 > > > Repository: ambari > > > Description > ------- > > Updated HDFS configs aren't applied after RESTART. > > Steps: > > - On a 3 node cluster, create a ConfigGroup for datanode. > - Override heap size to 1025m instead of 1024m > - Restart DN. > > Result: > - The /var/lib/ambari-agent/data/config.json, has the correct values for the config type: > {code} > "global": {"2": "version1392171779044", "tag": "version1"} > {code} > - The API call still shows global as default version: > {code} > http://hostname1:8080/api/v1/clusters/c1/hosts/hostname1/host_components/DATANODE > {code} > > Note: > It works after agent is restarted. > > {code} > { > global: { > overrides: { > 2: "version1392171779044" > }, > default: "version1" > } > {code} > > The cause is that hooks aren't executed for the custom_command like RESTART. Since configs for HDFS are generated in hook.py, we must execute hook.py before custom commands or move config generation from hook.py. > > > Diffs > ----- > > ambari-agent/src/main/python/resource_management/libraries/script/hook.py c5cae63 > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 7f2d1fb > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a6e52b0 > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java d607eb4 > ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py PRE-CREATION > ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py 0b62c87 > ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py PRE-CREATION > ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py 3239c7a > > Diff: https://reviews.apache.org/r/18211/diff/ > > > Testing > ------- > > 1 Unit test failed, as it was before applying the patch. > > Tests in error: > testDeleteUsers(org.apache.ambari.server.controller.AmbariManagementControllerTest): Could not remove user user1. System should have at least one user with administrator role. > > Tests run: 1401, Failures: 0, Errors: 1, Skipped: 7 > > > Thanks, > > Dmytro Sen > > --===============0145923864911567859==--