So did the original error end up getting fixed?  I couldn't tell from the
commits, jira, or this thread whether you reverted back to the original
behavior or not. 

Gareth was correct in the original post for this thread, 3.0.1 is broken. 
We just upgraded from Karaf 3.0.0 to Karaf 3.0.1 and all of feature file
based configs are broken now.  Let me stress, everybody's feature based
config deployments just broke between 3.0.0 and 3.0.1.

For all of karaf history, including Karaf 3.0.0, the config name's value was
parsed as <factoryPid>-<configName>.

If you had a feature file like:

<features name="features">
  <feature name="feature>
    <config name="my.factory-config1">
      prop1=value1
    </config>
  </feature>
</features>

I'd end up with a ConfigAdmin config like:
  service.pid: my.factory-123412341234342
  service.factoryPid: my.factory
  prop1: value1

Now, with Karaf 3.0.1 that same feature file results in:
  service.pid: config1-12312312312312123
  service.factoryPid: config1
  prop1: value1

FileInstall always followed the original convention as well, where a
filename would be factoryPid-configName.cfg.

I see commit
https://github.com/apache/karaf/commit/21089127c89ddae275d495607c422dda8ffec474
modified
features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java:
- return configurationAdmin.createFactoryConfiguration(pid, null);
+ return configurationAdmin.createFactoryConfiguration(factoryPid, null);

and it doesn't appear to be fixed in
https://github.com/apache/karaf/blob/master/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java

Why would you make such a drastic change to the way that a core part of
karaf works??



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problems-With-Factory-Configurations-In-Karaf-3-0-1-tp4033921p4035676.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to