karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4475) Performing status check will wipe cache if karaf.clean.all/karaf.clean.cache is set
Date Wed, 06 Apr 2016 16:39:25 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228598#comment-15228598

ASF subversion and git services commented on KARAF-4475:

Commit 4ed2a221b1ee5c3350e483c85bb8b1351104d008 in karaf's branch refs/heads/karaf-4.0.x from
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=4ed2a22 ]

KARAF-4475 Do not wipe karaf cache and data dir while karaf is running.

ConfigurationProperties was used as "Parser" for karaf config, by status and stop scripts.
This change moves all "state modifications" to a separate method which is only called by Main

> Performing status check will wipe cache if karaf.clean.all/karaf.clean.cache is set
> -----------------------------------------------------------------------------------
>                 Key: KARAF-4475
>                 URL: https://issues.apache.org/jira/browse/KARAF-4475
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Fabian Lange
> 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

This message was sent by Atlassian JIRA

View raw message