Hi,
let me explain a bit.
When you create a config using ConfigAdmin (using the ConfigAdmin
service), it doesn't create a file (it's in "memory"). In that
situation, if any change is not persisted to a cfg file.
On the other hand, if you create a cfg file in Karaf etc folder, then
the corresponding ConfigAdmin configuration is created and implicitely
add a felix.fileinstall.filename property. Then, any change to the
configuration is flush back to the cfg file.
So, in Karaf, you have a feature that automatically create the
corresponding cfg file when you create a configuration. And after that,
we are on the "normal" behavior.
The Karaf documentation is correct: when you have the
felix.fileinstall.filename property in a ConfigAdmin configuration, if
the enableConfigSave is true, it's flush back to cfg file, false doesn't.
The difference is when the configuration is create and without the
fileinstall.file property.
In the case, you may want to disable the "auto-create" cfg file done by
Karaf (ConfigRepository).
The ConfigRepository is create (in the config feature) like this:
ConfigRepository configRepository = new
ConfigRepositoryImpl(configurationAdmin, new
File(System.getProperty("karaf.etc")));
The File is the storage, if null, Karaf doesn't do any storage.
I propose to introduce a user property to let you define the storage
location or disable it.
Regards
JB
On 11/04/2016 08:29 PM, Kai Kreuzer wrote:
Hi,
I just came across the same issue. I would like to treat the etc folder as
read-only and thus prevent Karaf from doing changes to it. Nonetheless, I
want to keep fileinstall to read configs from etc and push them to
ConfigAdmin.
I would have expected this to work by merely setting
"felix.fileinstall.enableConfigSave = false" - this is what the Karaf (not
fileinstall!) documentation <https://karaf.apache.org/manual/latest/#_files>
suggests.
So what can I do to achieve my goal? What does it mean to "use a null
Storage"? What consequences does that have?
I hope you can help!
Thanks,
Kai
--
View this message in context:
http://karaf.922171.n3.nabble.com/felix-fileinstall-enableConfigSave-false-ignored-tp4047867p4048570.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com