karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4156) [karaf-3.0.x] set 'karaf.clean.all' as true will cause data folder cleaned while checking status
Date Sun, 27 Dec 2015 14:40:49 GMT

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

ASF GitHub Bot commented on KARAF-4156:
---------------------------------------

GitHub user oscerd opened a pull request:

    https://github.com/apache/karaf/pull/124

    [KARAF-4156] [karaf-3.0.x] set 'karaf.clean.all' as true will cause d…

    …ata folder cleaned while checking status
    
    Hi all,
    
    This PR is related to:
    https://issues.apache.org/jira/browse/KARAF-4156
    
    I hope it is better than the last one :-)
    
    I think it has to be merged on karaf-3.0.x branch too.
    
    Andrea

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/oscerd/karaf KARAF-4156

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/karaf/pull/124.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #124
    
----
commit 6ad6a2a817fb57dc3e2e2a52227679617f76adcf
Author: Andrea Cosentino <ancosen@gmail.com>
Date:   2015-12-27T14:36:02Z

    [KARAF-4156] [karaf-3.0.x] set 'karaf.clean.all' as true will cause data folder cleaned
while checking status

----


> [karaf-3.0.x] 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
>         Environment: Running on Mac OS X 10.11
>            Reporter: Jerry Meng
>            Priority: Critical
>             Fix For: 3.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)

Mime
View raw message