Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Contrail In-Service Software Upgrade from Releases 3.2 and 4.1 to 5.0.x using Helm Deployer

Contrail In-Service Software Upgrade (ISSU) Overview

If your installed version is Contrail Release 3.2 or higher, you can perform an in-service software upgrade (ISSU) to upgrade to Contrail Release 5.0.x using the Helm deployer. In performing the ISSU, the Contrail controller cluster is upgraded side-by-side with a parallel setup, and the compute nodes are upgraded in place.

Note:

We recommend that you take snapshots of your current system before you proceed with the upgrade process.

The procedure for performing the ISSU using the Contrail Helm deployer is similar to previous ISSU upgrade procedures.

Note:

This Contrail Helm deployer ISSU procedure does not include steps for upgrading OpenStack. If an OpenStack version upgrade is required, it should be performed using applicable OpenStack procedures.

In summary, the ISSU process consists of the following parts, in sequence:

  1. Deploy the new cluster.

  2. Synchronize the new and old clusters.

  3. Upgrade the compute nodes.

  4. Finalize the synchronization and complete the upgrades.

Prerequisites

The following prerequisites are required to use the Contrail Helm deployer ISSU procedure:

  • A previous version of Contrail installed, not earlier than Release 3.2.

  • There are OpenStack controller and compute nodes, and Contrail nodes.

  • OpenStack needs to have been installed from packages.

  • Contrail and OpenStack should be installed on different nodes.

Note:

Upgrade for compute nodes with Ubuntu 14.04 is not supported. Compute nodes need to be upgraded to Ubuntu 16.04 first.

Preparing the Contrail System for the Helm Deployer ISSU Procedure

In summary, these are the general steps for the system preparation phase of the Contrail Helm deployer ISSU procedure:

  1. Deploy the 5.0.x version of Contrail using the Contrail Helm deployer, but make sure to include only the following Contrail controller services:

    • Config

    • Control

    • Analytics

    • Databases

    • Any additional support services like rmq, kafka, and zookeeper. (The vrouter service will be deployed later on the old compute nodes.)

    Note:

    You must provide keystone authorization information for setup.

  2. After deployment is finished, you can log into the Contrail web interface to verify that it works.

Detailed instructions for deploying the new cloud using Helm are provided in Installing Contrail Networking for Kubernetes using Helm.

Provisioning Control Nodes and Performing Synchronization Steps

In summary, these are the general steps for the node provisioning and synchronization phase of the Contrail Helm deployer ISSU procedure:

  1. Provision new control nodes in the old cluster and old control nodes in the new cluster.

  2. Stop the following containers in the new cluster on all nodes:

    • contrail-device-manager

    • contrail-schema-transformer

    • contrail-svcmonitor

  3. Switch the new cloud into maintenance mode to prevent provisioning computes in the new cluster.

  4. Prepare the config file for the ISSU.

  5. Run the pre-sync script from the ISSU package.

  6. Run the run-sync script from the ISSU package in background mode.

The detailed steps to provision the control nodes and perform the synchronization are as follows:

  1. Pair the old control nodes in the new cluster. It is recommended to run it from any config-api container:

  2. Run this command for each old control node, substituting actual values where indicated:

  3. Pair the new control nodes in the old cluster with similar commands (the specific syntax depends on the deployment method of the old cluster), again substituting actual values where indicated.

  4. Stop all the containers for contrail-device-manager, contrail-schema-transformer, and contrail-svcmonitor in the new cluster on all controller nodes.

These next steps should be performed from any new Contrail controller. Then the configuration prepared for ISSU runs. (For now, only manual preparation is available.)

Note:

In various deployments, old cassandra may use port 9160 or 9161. You can learn the configuration details for the old services on any old controller node, in the file /etc/contrail-contrail-api.conf.

The configuration appears as follows and can be stored locally:

  1. Detect the config-api image ID:

  2. Run the pre-synchronization.

  3. Run the run-synchronization.

  4. Check the logs of the run-sync process. To do this, open the run-sync container.

  5. Stop and remove the run-sync process after all compute nodes are upgraded.

Transferring the Compute Nodes into the New Cluster

In summary, these are the general steps for the node transfer phase of the Contrail Helm deployer ISSU procedure:

  1. Select the compute node(s) for transferring into the new cluster.

  2. Move all workloads from the node(s) to other compute nodes. You also have the option to terminate workloads as appropriate.

  3. For Contrail Release 3.x, remove Contrail from the node(s) as follows:

    • Stop the vrouter-agent service.

    • Remove the vhost0 interface.

    • Switch the physical interface down, then up.

    • Remove the vrouter.ko module from the kernel.

  4. For Contrail Release 4.x, remove Contrail from the node(s) as follows:

    • Stop the agent container.

    • Restore the physical interface.

  5. Add the required node(s) to instances.yml with the roles vrouter and openstack_legacy_compute.

  6. Run the Contrail Helm deployer to deploy the new vrouter and to configure the old compute service.

  7. All new compute nodes will have:

    • The collector setting pointed to the new Contrail cluster

    • The Control/DNS nodes pointed to the new Contrail cluster

    • The config-api setting in vnc_api_lib.ini pointed to the new Contrail cluster

  8. (Optional) Run a test workload on transferred nodes to ensure the new vrouter-agent works correctly.

Follow these steps to rollback a compute node, if needed:

  1. Move the workload from the compute node.

  2. Stop the Contrail Release 5.0.x containers.

  3. Ensure the network configuration has been successfully reverted.

  4. Deploy the previous version of Contrail using the deployment method for that version.

The detailed steps for transferring compute nodes into the new cluster are as follows:

Note:

After moving workload from the chosen compute nodes, you should remove the previous version of contrail-agent. For example, for Ubuntu 16.04 and vrouter-agent installed directly on the host, these would be the steps to remove the previous contrail-agent:

The new instance requires two Helm repositories which can be downloaded from Juniper Networks.

  1. Download the file contrail-helm-deployer-release-tag.tgz onto your provisioning host

  2. Run the command scp contrail-helm-deployer-release-tag.tgz for all nodes in the cluster

  3. Untar contrail-helm-deployer-release-tag.tgz on all nodes:

The next set of steps sets up the new compute nodes for Contrail deployment.

Note:

You should run the steps in the following procedure from the same node where Contrail was deployed.

  1. Add the new instance to /opt/openstack-helm-infra/tools/gate/devel/multinode-inventory.yaml, in the nodes section.

  2. Prepare the new compute nodes for Contrail deployment:

  3. Verify the new node names by using the command kubectl get nodes.

  4. Label the new nodes as follows:

  5. To avoid reprovisioning compute nodes when adding them, set the maintenance mode to TRUE in values.yaml. For example:

  6. If adding vrouter with the DPDK or SRIOV role, switch the kernel to dpdk or sriov mode as appropriate.

    Note:

    You need only to deploy the vrouter Helm chart just once for the first compute node or nodes. Upon subsequent deployments, k8s will automatically deploy vrouter on the new nodes.

  7. Add vrouter as follows:

  8. After labeling and installing the new nodes, get the pods to verify they are operational.

    Note:

    If the new nodes are not deployed correctly, check for the presence of a default route. If a default route is not present, restore it.

  9. At this point, contrail-status for compute nodes should have output as follows:

  10. Restart contrail-control on all the new controller nodes after upgrading the compute nodes.

  11. Transfer the new code into the compute node as follows:

  12. Check status of new compute nodes by running contrail-status on them. All components should be active now. You can also check the status of the new instance by creating AZ/aggregates with the new compute nodes and run some test workloads to ensure it operates correctly.

Finalizing the Contrail Helm Deployer ISSU Process

Finalize the Contrail Helm deployer ISSU as follows:

  1. Stop the issu-run-sync container.

  2. Run the post synchronization commands.

  3. Start all previously stopped containers.

  4. Disengage maintenance mode. To do this, set the entry MAINTENANCE_MODE in values.yaml to FALSE, then run the following command from the deployment node:

  5. Clean up and remove the old Contrail controllers. Use the provision-issu.py script called from the config-api container, with the config issu.conf. Replace the credential variables and API server IP with appropriate values as indicated.

  6. Run the following commands from any controller node:

    Note:

    All *host_info parameters should contain the list of new hosts.

  7. Servers can be cleaned up if there are no other services present.

  8. All configurations for the neutron-api must be edited to have the parameter api_server_ip point to the list of new config-api IP addresses. Locate ContrailPlugin.ini (or other file that contains this parameter) and change the IP addresses to the list of new config-api IP addresses.

  9. The heat configuration needs the same changes. Locate the parameter [clients_contrail]/api_server and change it to point to the list of the new config-api IP addresses.