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

Reply via email to