Hello,

I've noticed that configuration created/modified via fileinstall (i.e. files
in 'etc' or 'deploy') seems to conflict with configuration created/modified
via the webconsole in Karaf 4.0.4.   In particular, settings modified via
the webconsole behave fine at runtime, but are overwritten upon restart _in
cases where that configuration originated from fileinstall_.  Right now,
we're telling our users "never mix the two", but it seems like this may be a
bug.  I just wanted to ask the community what the expected behavior should
be, and whether I should file a bug report.

Here are two easily reproducible scenarios.  I've used Karaf 4.0.4 on both
Linux and Windows:

Scenario 1: Overwriting webconsole config
1) Launch an instance of Karaf
2) Install the webconsole (feature:install webconsole)
3) Navigate to OSGi->configuration.  Find "Apache Karaf Log" and open the
edit window
4) Make a trivial change: change "size" to 501 and save
5) Go back in to the edit window to confirm that 501 is still present
6) Stop and start Karaf
7) Navigate to OSGi->configuration.  Find "Apache Karaf Log" and open the
edit window
8) Notice that the original value of '500' is present rather than your
edited value of 501!

Scenario 2:  Unintended factory configuration consequences
1) Launch an instance of Karaf.  
2) Install the webconsole (feature:install webconsole)
3) Navigate to OSGi->configuration.  Find the org.apache.felix.fileinstall
instance and open the edit window
4) Make a trivial change, change poll interval to '1001' and save
5) Look at the list of services. Everything looks fine; there is one
fileinstall instance, and it contains your edits
6) Stop and start Karaf
7) Navigate to OSGi->configuration.  Look for org.apache.felix.fileinstall
8) Notice that there are now TWO instances running; one with the original
config (1000), and one with your edited poll value (1001)!

Digging into this, it looks like all configuration via webconsole is saved
under ./data/cache - even if the configuration originated from ./etc.  Upon
re-start, configuration from ./etc and ./data/cache seem to separately
loaded.  Wherever they conflict, if neither is a factory configuration then
*one* of them wins.  It seems to always be ./etc, but it is unclear if that
is deterministic.  For factory configurations, configurations from *both*
places end up instantiating a service instance. 

Please let me know what *should* happen in either scenario, and if there are
any workarounds.   

Thanks,

  -Aaron



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Is-configuration-via-fileinstall-fundamentally-incompatible-with-webconsole-tp4045677.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to