You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Enrico Olivelli (Jira)" <ji...@apache.org> on 2020/02/25 06:36:00 UTC

[jira] [Commented] (ZOOKEEPER-3736) Zookeeper auto purge process does not purge files

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

Enrico Olivelli commented on ZOOKEEPER-3736:
--------------------------------------------

Please start a thread on user@apache.zookeeper.org

> Zookeeper auto purge process does not purge files
> -------------------------------------------------
>
>                 Key: ZOOKEEPER-3736
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3736
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.14
>         Environment: Docker version 3.5.
> Mac OS.
>            Reporter: Shubham S
>            Priority: Major
>
> Hi, I am building a zookeeper docker image from official docker images. I am currently using Zookeeper 3.4.14. I have 3 containers, each running a zookeeper server and I am setting the environment variable as shown in the docker-compose.yml file 
> environment:
>   ZOO_AUTOPURGE_PURGEINTERVAL: 24
>   ZOO_AUTOPURGE_SNAPRETAINCOUNT: 3
> I can clearly see the values reflecting back in my zoo.cfg.
>  
> {code:java}
> cat 
> /conf/zoo.cfg 
> clientPort=xxxx 
> dataDir=/data 
> dataLogDir=/datalog 
> tickTime=2000 
> initLimit=5 
> syncLimit=2 
> autopurge.snapRetainCount=3 
> autopurge.purgeInterval=24 
> maxClientCnxns=60 
> server.1=zoo1:xxxx:xxxx server.2=zoo2:xxxx:xxxx server.3=0.0.0.0:xxxx:xxxx
> {code}
>  
> Getting in the container and doing a printenv, I can see the values reflecting back as well.
>  
> {code:java}
> printenv 
> ZOO_DATA_LOG_DIR=/datalog 
> HOSTNAME=0536b195f621 
> JAVA_HOME=/usr/local/openjdk-8 
> ZOO_DATA_DIR=/data 
> JAVA_BASE_URL=https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_ 
> ZOO_INIT_LIMIT=5 
> PWD=/datalog/version-2 
> JAVA_URL_VERSION=8u232b09 
> ZOO_AUTOPURGE_SNAPRETAINCOUNT=3 
> HOME=/root 
> LANG=C.UTF-8 
> ZOO_SYNC_LIMIT=2 
> ZOO_SERVERS=server.1=zoo1:xxxx:xxxx server.2=zoo2:xxxx:xxxx server.3=0.0.0.0:xxxx:xxxx 
> SHLVL=1 
> ZOO_MY_ID=3 
> ZOO_MAX_CLIENT_CNXNS=60 
> ZOO_TICK_TIME=2000 
> ZOO_CONF_DIR=/conf PATH=/usr/local/openjdk-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/zookeeper-3.4.14/bin 
> ZOOCFGDIR=/conf 
> ZOO_AUTOPURGE_PURGEINTERVAL=24 
> JAVA_VERSION=8u232 
> ZOO_LOG_DIR=/logs 
> OLDPWD=/zookeeper-3.4.14 _=/usr/bin/printenv
> {code}
>  
>  
> I can also clearly see the purge task being completed as well
>  
> {code:java}
> 020-02-18T16:49:56.605549689Z 2020-02-18 16:49:56,604 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-18T16:49:56.636000804Z 2020-02-18 16:49:56,635 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed. 2020-02-19T16:49:56.606280261Z 2020-02-19 16:49:56,605 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-19T16:49:56.657389039Z 2020-02-19 16:49:56,657 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed. 2020-02-20T16:49:56.605362615Z 2020-02-20 16:49:56,604 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-20T16:49:56.612265088Z 2020-02-20 16:49:56,611 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed. 2020-02-21T16:49:56.605773207Z 2020-02-21 16:49:56,604 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-21T16:49:56.643037255Z 2020-02-21 16:49:56,642 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed. 2020-02-22T16:49:56.605712054Z 2020-02-22 16:49:56,605 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-22T16:49:56.661826480Z 2020-02-22 16:49:56,661 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed. 2020-02-23T16:49:56.606569211Z 2020-02-23 16:49:56,604 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-23T16:49:56.629269327Z 2020-02-23 16:49:56,628 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed. 2020-02-24T16:49:56.605299157Z 2020-02-24 16:49:56,604 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started. 2020-02-24T16:49:56.606483941Z 2020-02-24 16:49:56,606 [myid:3] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
> {code}
>  
> But neither the logs nor the snapshots are being deleted.
> I have redeployed the entire stack and even build a new image from the official docker images but I still am getting the same result.
>  
> Using the following command does work correctly but I don't want to do it manually.
> ./zkCleanup.sh -n 3
>  
> Can someone help me out? 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)