brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Zaccardo <mike.zacca...@cloudsoftcorp.com>
Subject Re: DynamicCluster memberspec with 2 entities
Date Mon, 09 Nov 2015 21:35:54 GMT
Hi Duncan,

I encountered this bug when developing BDP since I needed to have two
different entities as children (Redis and Cache Proxy).  My temporary "fix"
was to comment out the line which throws the exception since the lines
after it actually assign the correct parenthood.

"Fix" commit (see InternalEntityFactory.java):
https://github.com/mikezaccardo/incubator-brooklyn/commit/4e2d4b7b57f9380b72de746e5c99d12bf857c1b3

I will file a JIRA ticket for this.

Cheers,
Mike

On Fri, Nov 6, 2015 at 5:56 AM Duncan Grant <duncan.grant@cloudsoftcorp.com>
wrote:

> Is it possible to set the memberSpec of a dynamic cluster to contain 2
> entities?
>
> I've tried using a SameServerEntity e.g.:
>
> name: Empty System
> location: jclouds:softlayer:ams01
> services:
> - type: brooklyn.entity.group.DynamicCluster
>   initialSize: 2
>   memberSpec:
>     $brooklyn:entitySpec:
>       - type: org.apache.brooklyn.entity.software.base.SameServerEntity
>         brooklyn.children:
>         - type:
> org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
>         - type:
> org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
>
> and I've tried using a child relationship e.g:
>
> name: Empty System
> location: jclouds:softlayer:ams01
> services:
> - type: brooklyn.entity.group.DynamicCluster
>   initialSize: 2
>   memberSpec:
>     $brooklyn:entitySpec:
>       - type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
>         brooklyn.config:
>           children.startable.mode: background_late
>         brooklyn.children:
>         - type:
> org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
>
> but I get an error of the form:
>
> 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}
>
> Both the above yamls work if I set the initial size to 1 but the cluster
> will not be resizable.
>
> Thanks
>
> Duncan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message