You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Fabian Lange (JIRA)" <ji...@apache.org> on 2016/04/07 14:10:25 UTC
[jira] [Commented] (KARAF-4156) Set 'karaf.clean.all' as true will
cause data folder cleaned while checking status
[ https://issues.apache.org/jira/browse/KARAF-4156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15230143#comment-15230143 ]
Fabian Lange commented on KARAF-4156:
-------------------------------------
sorry, just now found this issue.
I opened a duplicate KARAF-4475 and already pushed and merged a fix, very similar to this one.
> Set 'karaf.clean.all' as true will cause data folder cleaned while checking status
> ----------------------------------------------------------------------------------
>
> Key: KARAF-4156
> URL: https://issues.apache.org/jira/browse/KARAF-4156
> Project: Karaf
> Issue Type: Bug
> Affects Versions: 3.0.5, 4.0.3
> Environment: Running on Mac OS X 10.11
> Reporter: Jerry Meng
> Assignee: Jean-Baptiste Onofré
> Priority: Critical
> Fix For: 4.1.0, 3.0.7, 4.0.6
>
>
> Scenario
> =======
> In etc/system.properties, it describes
> \# Deletes the entire karaf.data directory at every start
> karaf.clean.all = false
> When I set the property as true, I expect it will clean data folder ONLY at karaf start; however it also causes the command 'stop' and 'status' to delete data folder so that the command complains "shutdown port file doesn't exist. The container is not running."
> Root Cause
> =========
> The class 'org.apache.karaf.main.ConfigProperties' checks the property 'karaf.clean.all' in the constructor and deletes the data folder if it's set as true.
> In 'org.apache.karaf.main.Stop' and 'org.apache.karaf.main.Status', they will instantiate ConfigProperties at the very beginning. They will never get port file correctly in this case and even cause working directory being deleted.
> It seams that to delete data folder in the constructor of ConfigProperties does not make sense to me.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)