Details
Description
Whenever somebody does "new ConfigProperties()" the cache files are deleted:
https://github.com/apache/karaf/blob/master/main/src/main/java/org/apache/karaf/main/ConfigProperties.java#L181
This is problematic, as with a running karaf instance, somebody who will invoke the status script, will wipe the cache directory of the running instance, resulting in various problems
Both: Status and Stop are guilty of doing that.
https://github.com/apache/karaf/blob/b8c2617c278bb899c0af2ea1a8d2dc987f22f1cb/main/src/main/java/org/apache/karaf/main/Status.java#L38
https://github.com/apache/karaf/blob/b8c2617c278bb899c0af2ea1a8d2dc987f22f1cb/main/src/main/java/org/apache/karaf/main/Stop.java#L42
I propose to move the deletion logic to Main.launch()
https://github.com/apache/karaf/blob/b8c2617c278bb899c0af2ea1a8d2dc987f22f1cb/main/src/main/java/org/apache/karaf/main/Main.java#L230
Attachments
Issue Links
- is duplicated by
-
KARAF-4156 Set 'karaf.clean.all' as true will cause data folder cleaned while checking status
-
- Resolved
-
- relates to
-
KARAF-4819 System Property karaf.clean.all Doesn't Work
-
- Open
-