Thanks, I had a further look at this. I think the bug is quite old but never exposed as in 1.0.4 there was a bug with the naming of configuraiton files.
I had a lopk at the code and ran some tests. It seems that there is a check to see if the configuration in the JVM and on disk are the same. If they are the same the code deletes the configuration on Disk. AFAICT, the code is triggered by an OSGi even after the configuration from disk is loaded into the JVM, and so that trigger always causes all configurations on disk to be deleted. The test to see if the configurations are the same is valid. AFAICT, looking at the commit logs just after the 1.0.4 release there were some file naming issues fixed that caused this behaviour to activate. I think Carsten is going to have a much better idea what is going on since he is active in this area. Ian On 27 May 2012 08:22, Pontus Amberg <[email protected]> wrote: > Created an Issue in JIRA https://issues.apache.org/jira/browse/SLING-2495 . > I didn't specify component or version. > > /Pontus > > > On 2012-05-26 01:01, Ian Boston wrote: >> >> Yes, same here. >> The config files all get deleted. >> It happens after the bootstrap finished, and if I make the files >> readonly they are not deleted but there is not exception in the logs. >> >> Not sure why, I'll continue looking. If you havent already could you >> submit a bug report. >> Thanks >> Ian >> >> On 26 May 2012 07:28, Pontus Amberg<[email protected]> wrote: >>> >>> Where you able to reproduce the behaviour? I've also tried to use the >>> org.apache.sling.launchpad-7-SNAPSHOT-standalone.jar produced >>> by building the current trunk and I get the same behaviour when >>> stopping& starting the standalone jar. >>> >>> >>> /Pontus >>> >>> >>> On 2012-05-18 10:17, Ian Boston wrote: >>>> >>>> On 18 May 2012 01:45, Pontus Amberg<[email protected]> wrote: >>>>> >>>>> A file was created in /config/org/apache/sling/commons/log when I >>>>> changed >>>>> the >>>>> log level in the Logger Configuration but when I restarted the system >>>>> it >>>>> was >>>>> also removed at the startup. So the problem is not only affecting the >>>>> Authenticator. >>>>> >>>>> I might add that I modified the property >>>>> "installer.configuration.version" >>>>> in >>>>> installer/factories/configuration/pom.xml to 1.0.9-SNAPSHOT since It >>>>> otherwise was impossible to build Sling with an empty Maven repository. >>>>> I've added an issue in Jira about this >>>>> https://issues.apache.org/jira/browse/SLING-2482 >>>>> >>>>> Might this be the reason I'm having troubles with the config files? >>>> >>>> >>>> Could be. >>>> I am trying to reproduce now. Been a hectic day, sorry for the delay. >>>> Ian >>>> >>>>> /Pontus >>>>> >>>>> >>>>> On 2012-05-17 01:19, Ian Boston wrote: >>>>>> >>>>>> AFAIK, This doesn't normally happen. >>>>>> >>>>>> Does it happen to any of the other config files, or just the >>>>>> SlingAuthenticator.config ? >>>>>> >>>>>> Try adding a logging configuration, stopping and starting the tomcat >>>>>> instance. >>>>>> >>>>>> Ian >>>>>> >>>>>> >>>>>> On 17 May 2012 09:09, Pontus Amberg<[email protected]> >>>>>> wrote: >>>>>>> >>>>>>> I just noticed that config files stored in {sling.home}/config are >>>>>>> purged >>>>>>> when I >>>>>>> restart the server that the Sling WAR archive is hosted on. >>>>>>> >>>>>>> If I for example add authentication requirements in the >>>>>>> authentication >>>>>>> service >>>>>>> I can see that the SlingAuthenticator.config file is created in >>>>>>> config/org/apache/sling/engine/impl/auth but when I restart the >>>>>>> server >>>>>>> the >>>>>>> file >>>>>>> is removed and the settings are lost. The folders are still there >>>>>>> though. >>>>>>> >>>>>>> Is this a bug or is it a feature and if it is a feature how is it >>>>>>> disabled? >>>>>>> >>>>>>> /Pontus >>>>>>> >
