Skip to main content

Privacera Documentation

Table of ContentsTable of Contents

Unable to upgrade from 4.x to 5.x or 6.x due to Zookeeper snapshot issue

Problem: The Privacera upgrade from 4.x to 6.x fails due the following exceptions.

  • Exception

  • Unable to load database on disk

  • java.io.IOException: No snapshot found, but there are log entries. Something is broken!

  • Unexpected exception, exiting abnormally

  • java.lang.RuntimeException: Unable to run quorum server

Cause: Zookeeper pod/container stopped before performing the upgrade.

Solution

Before starting the upgrade, do the following:

  1. Ensure Zookeeper pod/container is up & running. If it was stopped, restart it and run the update again.

  2. If Step 1 does not resolve the upgrade issue, do the following:

    Docker
    1. Run the following command:

      cd ~/privacera/docker/
      ./privacera_services down
      mkdir -p ../backup/zooData
      cp -r data/zoo-1/data ../backup/zooData/
      mv data/zoo-1/data/* data/zoo-1/datalog/
      mkdir -p data/zoo-1/data/version-2
      cp ../privacera-manager/ansible/privacera-docker/roles/files/zookeeper/snapshot.0 data/zoo-1/data/versi
    2. Update Privacera Manager.

      cd ~/privacera/privacera-manager/ 
      ./privacera-manager.sh update
    Kubernetes
    1. Edit zookeeper-statefulset.yml.

      cd ~/privacera/privacera-manager/output/kubernetes/helm/zookeeper/templates 
      vi zookeeper-statefulset.yml +57
    2. Add the following line. It should be before the /docker-entrypoint.sh zkServer.sh start-foreground line.

      sleep 120 && \
    3. Save and exit the file.

    4. In the following command, enter your Kubernetes namespace in $YOUR_NAMESPACE and then run it.

      kubectl apply -f zookeeper-statefulset.yml -n $YOUR_NAMESPACEcd ~/privacera/privacera-manager/ansible/privacera-docker/roles/files/zookeeper/ kubectl -n $YOUR_NAMESPACE cp snapshot.0 zk-0:/store/data/version-2/
    5. Run the update.

      cd ~/privacera/privacera-manager/ 
      ./privacera-manager.sh update