1. Overview

If your Twistlock Console has been progressively upgraded from version 2.0 (or earlier) to 2.4, you must run the following steps before upgrading to 2.5. This modified upgrade process is required because there are some prerequisites for upgrading MongoDB.

Make sure that you are running Twistlock version 2.4 before running the following steps.

1.1. Stand alone installations

The following procedure is for Onebox or Console installed with the twistlock.sh script.

Procedure

  1. Exec into your running 2.4.xx Console container.

    $ sudo docker exec -ti twistlock_console mongo --ssl --sslAllowInvalidHostnames --sslCAFile /var/lib/twistlock/certificates/ca.pem --sslPEMKeyFile /var/lib/twistlock/certificates/client.pem --sslPEMKeyPassword $(cat /var/lib/twistlock/certificates/service-parameter)
  2. Verify that the featureCompatibilityVersion is 3.2.

    > db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
    { "featureCompatibilityVersion" : { "version" : "3.2" }, "ok" : 1 }
  3. Set the version to 3.4.

    > db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
  4. Get the version again and verify that it has been changed to 3.4.

    > db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
    { "featureCompatibilityVersion" : { "version" : "3.4" }, "ok" : 1 }
  5. Exit the container.

    > exit
    # exit

1.2. Orchestrator installations

If you run Twistlock Console in a cluster, such as Kubernetes or Openshift, then follow these steps before upgrading to 2.5.

If you’re upgrading an OpenShift installation, replace kubectl with oc in the following commands.

Procedure

  1. Get the pod name for Console.

    $ kubectl get pods -n twistlock
  2. Exec into the Console pod.

    $ kubectl exec -ti <twistlock-console-pod> -n twistlock ash
  3. Verify that the featureCompatibilityVersion is 3.2.

    > db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
    { "featureCompatibilityVersion" : { "version" : "3.2" }, "ok" : 1 }
  4. Set the version to 3.4.

    > db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
  5. Get the version again and verify that it has been changed to 3.4.

    > db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
    { "featureCompatibilityVersion" : { "version" : "3.4" }, "ok" : 1 }
  6. Exit the container.

    > exit
    # exit

Now you can upgrade to 2.5 version. For upgrade instructions, see Upgrade Twistlock.

If you have any issues with the steps described here, or if you see a different version of MongoDB in step 3, contact support@twistlock.com for further troubleshooting.