karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moloney (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5474) features being configured twice
Date Thu, 09 Nov 2017 17:33:00 GMT

    [ 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:
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

View raw message