You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Tim Moloney (JIRA)" <ji...@apache.org> on 2017/11/09 17:33:00 UTC

[jira] [Commented] (KARAF-5474) features being configured twice

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

Tim Moloney commented on KARAF-5474:
------------------------------------

I think that I figured it out.  I think that it is a configuration issue in the stock configuration of Karaf Container (apache-karaf-4.0.10.tar.gz).

etc/org.apache.karaf.features.cfg contains:
#configCfgStore=true
which I think means that the default setting is for the features service to write feature configurations to the configuration directory, etc.

etc/config.properties contains:
felix.fileinstall.dir = ${karaf.etc}
which means that the fileinstall service will monitor the etc directory for changes.

I believe that the combination of these two settings causes the following:
the features service sends the configuration to configuration admin (first config)
the features service writes the configuration to etc
the fileinstall service sees the new file in etc
the file install service write the configuration to configuration admin (second config)
Setting configCfgStore=false fixes everything.

So in the end, the two issues I asked about in my original email were related.  The second issue was causing the first.


> features being configured twice
> -------------------------------
>
>                 Key: KARAF-5474
>                 URL: https://issues.apache.org/jira/browse/KARAF-5474
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.0.10
>            Reporter: Tim Moloney
>
> Feature configurations are being sent twice to the service factories with two different service pids.
> Example:
> If a feature has the following config element:
> {{<config name="FooServiceFactory-Instance1">}}
> then {{FooServiceFactory.update(String pid, Dictionary properties)}} will be called twice.  Each call with have the same {{properties}}, but different {{pid}} s.
> See the [thread|http://mail-archives.apache.org/mod_mbox/karaf-user/201711.mbox/%3C76720540-cf2a-1a0b-196b-9448396aeced%40nanthrax.net%3E] in the mailing list.



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