brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetoslav Neykov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-519) Persisting yaml blueprint with $brooklyn:entitySpec stores all configs
Date Wed, 21 Jun 2017 13:56:00 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16057560#comment-16057560
] 

Svetoslav Neykov commented on BROOKLYN-519:
-------------------------------------------

To restate the problem as I understand it. Persisting an {{EntitySpec}} will persist all of
the {{parameters}}, including the config keys of the java type. When a config key is removed
from the type and its class is deleted the parameter remains in the persisted state and causes
a rebind failure.

We don't really need to persist the parameters coming from the java type, just those added
in yaml. A similar issue has been fixed in entities where only the additional config keys
are serialized at [1].


[1] https://github.com/apache/brooklyn-server/pull/440

> Persisting yaml blueprint with $brooklyn:entitySpec stores all configs
> ----------------------------------------------------------------------
>
>                 Key: BROOKLYN-519
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-519
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Valentin Aitken
>
> Scenario:
> # Deploy the blueprint:
> {noformat}
> location: localhost
> services:
> - type: org.apache.brooklyn.entity.stock.BasicApplication
>   brooklyn.config:
>     childSpec:
>       $brooklyn:entitySpec:
>        - type: brooklyn.entity.group.DynamicCluster
> {noformat}
> # Inspect persistence 
> {noformat}
>     <childSpec>
>       <org.apache.brooklyn.api.entity.EntitySpec>
>         <type>org.apache.brooklyn.entity.group.DynamicCluster</type>
>         <catalogItemIdSearchPath class="MutableSet"/>
>         <tags class="MutableSet"/>
>         <parameters class="ImmutableList">
>           <org.apache.brooklyn.core.objs.BasicSpecParameter>
>             <label>cluster.initial.quorumSize</label>
>             <pinned>false</pinned>
>             <configKey class="configKey">
>               <name>cluster.initial.quorumSize</name>
>               <type>java.lang.Integer</type>
>               <description>Initial cluster quorum size - number of initial nodes
that must have been successfully started to report success (if &lt; 0, then use value
of INITIAL_SIZE)</description>
>               <defaultValue class="int">-1</defaultValue>
>               <reconfigurable>false</reconfigurable>
>               <constraint class="com.google.common.base.Predicates$ObjectPredicate">ALWAYS_TRUE</constraint>
>             </configKey>
>           </org.apache.brooklyn.core.objs.BasicSpecParameter>
>           <org.apache.brooklyn.core.objs.BasicSpecParameter>
>             <label>cluster.initial.size</label>
>             <pinned>false</pinned>
>             <configKey class="configKey">
>               <name>cluster.initial.size</name>
>               .....
>             </configKey>
>           </org.apache.brooklyn.core.objs.BasicSpecParameter>
>         ...
>         </parameters>
>       </org.apache.brooklyn.api.entity.EntitySpec>
>     </childSpec>
> {noformat}
> Concern:
> Persisting all config keys can lead to persistence problems when changing config keys
of a type.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message