Download This Guide
Related Documentation
Contrail In-Service Software Upgrade
Contrail In-Service Software Upgrade (ISSU) Overview
Starting with Contrail Release 3.2, it is possible to upgrade an existing Contrail installation with a newer version of Contrail, without interrupting system operation, by performing an in-service software upgrade (ISSU).
For ISSU, the Contrail controller cluster is upgraded side-by-side with a parallel setup, and the compute nodes are upgraded in place.
It is possible to perform ISSU with Fabric commands to consolidate the manual commands necessary for ISSU.
This section describes the steps to perform Contrail ISSU, including detailed manual command-line (CLI) procedures, and the corresponding Fabric commands created to streamline the ISSU process.
The candidate cluster for an ISSU upgrade should have the OpenStack and Contrail processes installed on separate nodes.
There will be a maintenance window during which the upgrade process is ongoing. However, existing workloads will not be or will be very minimally disturbed.
The essential ISSU steps are:
- Prepare the system.
- Configure and run time synchronization.
- Upgrade compute nodes.
- Rollback compute nodes if needed.
- Finalize the upgrade.
Fabric Commands for Upgrade Procedure
Contrail ISSU can be performed manually or you can use Fabric commands that consolidate some of the manual steps.
Fabric commands for ISSU should be initiated from the newer Contrail controller.
Table 1 compares the fab commands with the corresponding CLI commands. For more details about the CLI commands, see Details of the CLI Manual ISSU Procedure.
Table 1: ISSU Fabric Commands and CLI Commands
Fabric Commands | Manual Commands and Summary Description |
---|---|
fab issu_contrail_migrate_config | New roles are defined in the testbed.py to provide information about the existing controller.
Up to this point in ISSU, there is no traffic impact on the compute nodes. |
fab issu_contrail_migrate_compute |
|
fab issu_contrail_rollback_compute |
Once a newer state is created through the newer controller, rollback is not advised. |
fab issu_contrail_finalize |
The system is now upgraded. |
Details of the CLI Manual ISSU Procedure
This section provides details for each step of the CLI manual procedure for Contrail ISSU.
- Start a parallel setup—install the same number of
Contrail controller nodes as are currently running, and that need
an upgrade with newer software. Use the following guidelines:
- The newer Contrail nodes can point to the existing database,
or you can install a newer database as needed for migration.
If the nodes point to the same database, ensure that the databases are logically separated for both the versions by configuring the following:
- cluster_id
- contrail-analytics-api.conf
- contrail-api.conf
- contrail-device-manager.conf
- contrail-discovery.conf
- contrail-schema.conf
- contrail-snmp-collector.conf
- contrail-svc-monitor.conf
- kafka_prefix in contrail-alarm-gen.conf and contrail-collector.conf
- OpenStack RabbitMQ should not be on the Contrail controller
nodes. RabbitMQ can be external to either version of the Contrail
controller nodes, and it can be shared.
If RabbitMQ is shared, ensure the controllers are logically separated, by configuring rabbit_vhost in the following:
- contrail-api.conf
- contrail-device-manager.conf
- contrail-schema.conf
- contrail-svc-monitor.conf
- To avoid changing OpenStack configuration files during
the migration procedure, the Contrail controller should be front-ended
with a load balancer, typically HAProxy.
Additionally, if the database is shared, it should also be front-ended with a load balancer, typically HAProxy.
- The newer Contrail nodes can point to the existing database,
or you can install a newer database as needed for migration.
- Prepare the system for upgrade.
- BGP peer the Contrail controllers of the existing version
and the newer version:
python /opt/contrail/utils/provision_control.py --host_name <host-name> --host_ip <host-ip> --api_server_ip <api-server-ip> --api_server_port <api-server-port> --oper add --admin_user admin --admin_password secret123 --admin_tenant_name admin --router_asn 64512 --ibgp_auto_mesh
- On each of the control nodes, ensure that the only services
running under supervisor_config are discovery,
api, and ifmap services:
openstack-config --set /etc/contrail/supervisord_config.conf include files \"/etc/contrail/supervisord_config_files/contrail-api.ini /etc/contrail/supervisord_config_files/contrail-discovery.ini /etc/contrail/supervisord_config_files/ifmap.ini\"
- BGP peer the Contrail controllers of the existing version
and the newer version:
- Freeze the north bound communication of Contrail.
- Initiate the pre-sync.
issu_contrail_pre_sync.py
- Initiate the runtime sync between old the Contrail controller
and new controller.
issu_contrail_run_sync.py
The runtime sync operates until the ISSU procedure completes. The runtime sync is daemonized and runs under supervisord, using the following commands:
- touch /etc/supervisor/conf.d/contrail-issu.conf
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu command 'contrail-issu-run-sync'
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu numprocs 1
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu process_name '%(process_num)s'
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu redirect_stderr true
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu stdout_logfile '/var/log/issu-contrail-run-sync-%(process_num)s-stdout.log'
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu stderr_logfile '/dev/null'
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu priority 440
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu autostart true
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu killasgroup false
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu stopsignal KILL
- openstack-config --set /etc/supervisor/conf.d/contrail-issu.conf program:contrail-issu exitcodes 0
- service supervisor restart
- Unfreeze the north bound communication.
Up to this point in the ISSU procedure, there is no traffic impact on compute nodes.
- Initiate compute node migration. There will be traffic
impact during this process, for the compute nodes that are in migration.
Compute nodes can be upgraded one at a time or in groups.
- Prepare the compute nodes for the upgrade by running the
following commands on each compute node:
- openstack-config --del /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent autostart
- openstack-config --del /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent killasgroup
- Upgrade the Python package on each of the compute nodes.
- Change the settings in the compute nodes to point to the
new controller. Repeat the following commands for each compute node.
- openstack-config --set /etc/contrail/contrail-vrouter-agent.conf DISCOVERY server <new-discovery-ip>
- openstack-config --set /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent autostart true
- openstack-config --set /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent killasgroup true
- openstack-config --set /etc/contrail/contrail-vrouter-nodemgr.conf DISCOVERY server %s <new-discovery-ip>
- service supervisor-vrouter restart
- VMs can be spawned on the upgraded compute nodes.
- Prepare the compute nodes for the upgrade by running the
following commands on each compute node:
- When all compute nodes are migrated, freeze the north
bound communication.
Note: If the north bound communication is still open, Contrail control is in service. Once all compute nodes are migrated, freeze the north bound.
- Rollback the compute nodes if needed. Up to this point, if there is an issue during the upgrade process, the administrator can use the rollback process to return the compute nodes to their original state. For more information, see Rollback of Compute Nodes .
- Finalize the upgrade. Migrate the rest of the state by
using the following commands.
- Stop the Contrail services on the older version.
Service supervisor-config stop Service supervisor-analytics stop Service supervisor-control stop Service supervisor-webui stop
- Perform post-sync.
rm -f /etc/supervisor/conf.d/contrail-issu.conf service supervisor restart contrail-issu-post-sync contrail-issu-zk-sync
- Update the supervisor-config files.
- openstack-config --set /etc/contrail/supervisord_config.conf include files \"/etc/contrail/supervisord_config_files/*.ini\"
- service supervisor-config restart
- Run contrail-status to verify all of the services are up and running.
- Stop the Contrail services on the older version.
- Open the north bound communication and change it to point to the new controller. If you are using HAProxy, change the backend to point to the new controller instead of the old controller.
- Clean up the previous configuration of the api, control,
analytics, and database nodes by running the following commands on
each configured node.
- python provision_config_node.py --api_server_ip <new-api-server-ip> --host_name <old-api-server-name> --host_ip <old-api-server-ip> --oper del --admin_user admin --admin_password secret123 --admin_tenant_name admin
- python provision_analytics_node.py --api_server_ip <new-api-server-ip> --host_name <old-analytics-server-name> --host_ip <old-analytics-ip> --oper del --admin_user admin --admin_password secret123 --admin_tenant_name admin
- python provision_control.py --api_server_ip <new-api-server-ip> --api_server_port 8082 --router_asn 64512 --admin_user admin --admin_password secret123 --admin_tenant_name admin --host_name <old-control-node-name> --host_ip <old-control-ip> --oper del
- python provision_database_node.py --api_server_ip 10.87.64.53 --host_name <old-database-host-name> --host_ip <old-database-ip> --oper del --admin_user admin --admin_password secret123 --admin_tenant_name admin
- Finalize the new installation. Add new api, analytics,
and database configurations by running the following commands on each
configured node.
Note: New control nodes were already added at the beginning of the ISSU procedure.
- python provision_config_node.py --api_server_ip <new-api-server-ip> --host_name <new-api-server-host-name> --host_ip <new-api-server-ip> --oper add --admin_user admin --admin_password secret123 --admin_tenant_name admin
- python provision_analytics_node.py --api_server_ip <new-api-server-ip> --host_name <new-analytics-server-host-name> --host_ip <new-analytics-server-ip> --oper add --admin_user admin --admin_password secret123 --admin_tenant_name admin
- python provision_database_node.py --api_server_ip <new-api-server-ip> --host_name <new-database-host-name> --host_ip <new-database-ip> --oper add --admin_user admin --admin_password secret123 --admin_tenant_name admin
Rollback of Compute Nodes
If a failure is encountered upon upgrading the compute nodes, the system administrator can issue the rollback command, and all of the upgraded compute nodes can be rolled back to their original configuration.
![]() | Note: Rollback of compute nodes is not recommended during or after the step “Finalize the upgrade” (migrate the rest of the state). Doing so could cause loss of data. |
- Prepare the compute nodes for the rollback by issuing
the following commands on each of the compute nodes.
- openstack-config --del /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent autostart
- openstack-config --del /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent killasgroup
- Downgrade the Python package on each of the compute nodes.
- Once the compute node is downgraded, change the settings
in the compute node to point to the old controller.
- openstack-config --set /etc/contrail/contrail-vrouter-agent.conf DISCOVERY server <old-discovery-ip>
- openstack-config --set /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent autostart true
- openstack-config --set /etc/contrail/supervisord_vrouter_files/contrail-vrouter-agent.ini program:contrail-vrouter-agent killasgroup true
- openstack-config --set /etc/contrail/contrail-vrouter-nodemgr.conf DISCOVERY server %s <old-discovery-ip>
- service supervisor-vrouter restart
- Repeat this procedure for each of the upgraded compute nodes.