Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29C1417817 for ; Thu, 19 Nov 2015 16:30:21 +0000 (UTC) Received: (qmail 47104 invoked by uid 500); 19 Nov 2015 16:30:21 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 47077 invoked by uid 500); 19 Nov 2015 16:30:21 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 47064 invoked by uid 99); 19 Nov 2015 16:30:21 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 16:30:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 787311A2A6C for ; Thu, 19 Nov 2015 16:30:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 6Yc42jftNanN for ; Thu, 19 Nov 2015 16:30:11 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 67491232B5 for ; Thu, 19 Nov 2015 16:30:11 +0000 (UTC) Received: (qmail 45396 invoked by uid 99); 19 Nov 2015 16:30:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 16:30:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2A8312C14FB for ; Thu, 19 Nov 2015 16:30:11 +0000 (UTC) Date: Thu, 19 Nov 2015 16:30:11 +0000 (UTC) From: "Duncan Grant (JIRA)" To: dev@brooklyn.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-192) Cannot create DynamicCluster of [entities with multiple children] of size greater than one MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BROOKLYN-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013799#comment-15013799 ] Duncan Grant commented on BROOKLYN-192: --------------------------------------- So this happens because the DynamicCluster uses EntitySpec.create to duplicate the memberspec but this only duplicates the memberspec not the children. I think the fix should be that EntitySpec.create should also duplicate children. If no one has any objections I'll open a pull request. > Cannot create DynamicCluster of [entities with multiple children] of size greater than one > ------------------------------------------------------------------------------------------ > > Key: BROOKLYN-192 > URL: https://issues.apache.org/jira/browse/BROOKLYN-192 > Project: Brooklyn > Issue Type: Bug > Affects Versions: 0.9.0 > Reporter: Mike Zaccardo > > When a `DynamicCluster` of entities, each of which have multiple `brooklyn.children` entities, is created with an initial size greater than one: > {code:java} > org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: > org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error > invoking start at DynamicClusterImpl{id=vxtguIix}: > java.lang.IllegalStateException: On start of cluster > DynamicClusterImpl{id=vxtguIix}, failed to get to initial size of 2; size > is 1: Spec EntitySpec{type=interface > org.apache.brooklyn.entity.software.base.EmptySoftwareProcess} has parent > EmptySoftwareProcessImpl{id=hN8uSfbM} defined, but it is defined as a child > of EmptySoftwareProcessImpl{id=ft1Egn5i} > {code} > The exception is thrown here: https://github.com/apache/incubator-brooklyn/blob/master/core/src/main/java/org/apache/brooklyn/core/objs/proxy/InternalEntityFactory.java#L210 > It is thrown because the `brooklyn.children` specs have their parent values erroneously assigned to an entity that is not actually their immediate parent. -- This message was sent by Atlassian JIRA (v6.3.4#6332)