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 95473110C2 for ; Thu, 7 Aug 2014 02:41:42 +0000 (UTC) Received: (qmail 86247 invoked by uid 500); 7 Aug 2014 02:41:42 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 86214 invoked by uid 500); 7 Aug 2014 02:41:42 -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 86183 invoked by uid 99); 7 Aug 2014 02:41:42 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2014 02:41:42 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id F0C381DB3C4; Thu, 7 Aug 2014 02:41:27 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4144340263040651297==" MIME-Version: 1.0 Subject: Re: Review Request 24428: Include configuration in exported blueprints From: "John Speidel" To: "Mahadev Konar" , "Nate Cole" , "Sid Wagle" , "Tom Beerbower" Cc: "Ambari" , "John Speidel" Date: Thu, 07 Aug 2014 02:41:27 -0000 Message-ID: <20140807024127.1595.44450@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "John Speidel" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/24428/ X-Sender: "John Speidel" References: <20140806230856.1586.19035@reviews.apache.org> In-Reply-To: <20140806230856.1586.19035@reviews.apache.org> Reply-To: "John Speidel" X-ReviewRequest-Repository: ambari --===============4144340263040651297== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On Aug. 6, 2014, 11:08 p.m., Sid Wagle wrote: > > Patch looks good. Question: How does the export look with Configuration Groups when a host belongs to multiple Config groups? The configuration properties for such a host will be different from the rest of the cluster. > > > > John Speidel wrote: > A host can only belong to a single host group now. All hosts in a host group are identical in both components and configuration. Sorry, misread your question. If a host group belongs to multiple host config groups, those config groups are included in the host group. The properties specified within the host group override the corresponding cluster and default values for all hosts mapped to the host group. For example: ... "host_groups" : [ { "name" : "host_group_1", "configurations" : [ { "nagios-env" : { "properties" : { "nagios_contact" : "sfdsfds@fgddffgfdgdfhew.gdfg" } } }, { "hive-site" : { "properties" : { "foo" : "bar } } } ], ... - John ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/24428/#review49826 ----------------------------------------------------------- On Aug. 6, 2014, 11:08 p.m., John Speidel wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/24428/ > ----------------------------------------------------------- > > (Updated Aug. 6, 2014, 11:08 p.m.) > > > Review request for Ambari, Mahadev Konar, Nate Cole, Sid Wagle, and Tom Beerbower. > > > Bugs: AMBARI-6762 > https://issues.apache.org/jira/browse/AMBARI-6762 > > > Repository: ambari > > > Description > ------- > > Include both host group and cluster scoped configuration in an exported blueprint. > To export a blueprint, use the api: > AMBARI_HOST:8080/api/v1/clusters/:clustername?format=blueprint > The exported blueprint will contain the entire configuration for the associated cluster. The only properties which are not included are those that are marked as "input required" in the stack. All passwords are marked as required so they will not be exported. Also, any hostnames in the configuration properties are replaced with a hostgroup token: %HOSTGROUP::group1%. When a cluster is provisioned from the blueprint, the hostgroup tokens are resolved to host names for the target cluster. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java db3dff8 > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java eff3854 > ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java 0130de4 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java d723512 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java f99955b > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProvider.java 06d556d > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostGroup.java PRE-CREATION > ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java 4d2e60e > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java PRE-CREATION > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java d1aa4d5 > > Diff: https://reviews.apache.org/r/24428/diff/ > > > Testing > ------- > > Unit tests: > - New tests > - All tests pass > > Results : > > Tests run: 1883, Failures: 0, Errors: 0, Skipped: 14 > ... > Total run:544 > Total errors:0 > Total failures:0 > OK > > *Note: I did @Ignore a test for this commit. The related functionality was tested in a functional test. I will add the test back tomorrow. > > Functional Tests: > - Exported blueprints with configurations > - Created multiple clusters > -- from custom BP > -- from an exported BP with configuration > > > Thanks, > > John Speidel > > --===============4144340263040651297==--