ON THIS PAGE
Upgrade Procedure for RHOSP-based Contrail 4.1.3 to Contrail 4.1.4
This section presents the steps to upgrade a RHOSP-based Contrail deployment from Contrail version 4.1.3 to Contrail version 4.1.4.
Prerequisites
Ensure you have a cloud up and running with RHOSP10 and Contrail 4.1.3 before you proceed with the upgrade procedure.
This procedure has been validated with the following Contrail, Red Hat, and OpenStack versions.
Contrail Version |
Red Hat Version |
OpenStack Version |
---|---|---|
4.1.3 |
RHEL 7.6 (3.10.0-957.el7.x86_64) |
RHOSP10 (packages dated October 29, 2018) |
4.1.3 |
RHEL 7.5 (3.10.0-862.11.6.el7.x86_64) |
RHOSP10 (packages dated October 29, 2018) |
Set the Red Hat Satellite filter end date to December 9, 2019 before proceeding with the upgrade.
Post-Installation
After the installation, you’ll have a cloud networking running RHOSP10 and Contrail 4.1.4. The Red Hat Enterprise Linux (RHEL) kernel version updates to 7.7 during this procedure.
Table 2 summarizes the post-installation software versions.
Contrail Version |
Red Hat Version |
OpenStack Version |
---|---|---|
4.1.4 |
RHEL 7.7 (3.10.0-1062.el7.x86_64) RHEL 7.7 (3.10.0-1062.1.2.el7.x86_64) RHEL 7.7 (3.10.0-1062.9.1.el7.x86_64) |
RHOSP10 (packages dated December 9, 2019) |
Contrail version R4.1.4 supports net-snmp package version 5.7.2-43 to support SNMP. The net-snmp packages come from Red Hat, with the exception of the net-snmp-python-5.7.2-43.el7.x86_64.rpm package which is provided in the Contrail repository.
Table 3 summarizes the net-snmp depend packages and their associated repository locations.
Net-SNMP Depend Packages |
Repository |
---|---|
net-snmp-5.7.2-43.el7.x86_64.rpm |
Red Hat Satellite |
net-snmp-agent-libs-5.7.2-43.el7.x86_64.rpm |
Red Hat Satellite |
net-snmp-libs-5.7.2-43.el7.x86_64.rpm |
Red Hat Satellite |
net-snmp-python-5.7.2-43.el7.x86_64.rpm |
Contrail |
net-snmp-utils-5.7.2-43.el7.x86_64.rpm |
Red Hat Satellite |
Acquire the Software
To download the software images for this procedure:
-
Go to the Juniper Networks Support site for Contrail.
-
Select OS as Contrail and Version as 4.1.4. Download the images that apply to your environment.
Upgrade the Undercloud
-
Log in to the undercloud as the stack user.
$ su – stack
-
Update the Contrail repositories.
-
Backup the Contrail 4.1.3 packages to a repository with a different name. In this example, the packages are moved to a repository named contrail-R4-1-3.
[stack@undercloud ~]$ cd /var/www/html/ [stack@undercloud html]$ sudo mv contrail/ contrail-R4-1-3
-
Create a new repository directory to store the Contrail 4.1.4 packages:
[stack@undercloud html]$ sudo mkdir contrail
-
-
Copy the downloaded file—in the provided sample, the file is contrail-install-packages_4.1.4.0-63-newton.tgz—to the Contrail repository created in Step 2.
Note:This step assumes that you've already downloaded the Contrail software. See Acquire the Software.
[stack@undercloud contrail]$ ls -lrt total 377104 -rw-r--r--. 1 root root 386151602 Mar 14 06:58 contrail-install-packages_4.1.4.0-63-newton.tgz
-
Untar the downloaded tgz file.
[stack@undercloud contrail]$ sudo tar -xvf contrail-install-packages_4.1.4.0-63-newton.tgz
-
Create a repository in the new directory:
[stack@undercloud contrail]$ pwd /var/www/html/contrail [stack@undercloud contrail]$ sudo createrepo .
If the createrepo command is not available, download the createrepo package from Red Hat (Red Hat subscription required).
-
(Clusters deployed using Swift Puppet files only) If your Contrail 4.1 cluster was deployed using Swift Puppet, perform these steps:
-
Remove overcloud artifacts from the undercloud:
[stack@undercloud ~]$ swift delete overcloud-artifacts puppet-modules.tgz overcloud-artifacts
-
Delete the deployments-artifacts.yaml file if the file is present.
[stack@undercloud ~]$ ls /home/stack/.tripleo/environments/deployment-artifacts.yaml [stack@undercloud ~]$ rm -rf /home/stack/.tripleo/environments/deployment-artifacts.yaml
-
Clean the repositories and confirm that all repositories are available.
[stack@undercloud ~]$ sudo yum clean all [stack@undercloud ~]$ sudo yum repolist
-
-
Stop the main OpenStack platform services.
$ sudo systemctl stop 'openstack-*' 'neutron-*' httpd
-
Update the
python-tripleoclient
package and its dependencies to ensure you have the most current scripts for the minor version update.$ sudo yum update python-tripleoclient
-
Upgrade the undercloud.
$ openstack undercloud upgrade
-
Reboot the node.
$ sudo reboot
Wait for the node to reboot. The reboot process can take 10 or more minutes to complete.
-
Ensure the undercloud has the latest Contrail R4.1.4 contrail packages:
[stack@undercloud ~]$ rpm -qa | grep contrail puppet-contrail-4.1.4.0-X.el7.noarch contrail-tripleo-heat-templates-4.1.4.0-x.el7.noarch contrail-tripleo-puppet-4.1.4.0-x.el7.noarch python-gevent-1.1rc5-1contrail1.el7.x86_64
-
Ensure the undercloud has the latest RHOSP images:
[stack@undercloud]$ rpm -qa | grep direct rhosp-director-images-10.0-20180821.1.el7ost.noarch rhosp-director-images-10.0-20190829.1.el7ost.noarch rhosp-director-images-10.0-20190918.1.el7ost.noarch rhosp-director-images-ipa-10.0-20190829.1.el7ost.noarch rhosp-director-images-ipa-10.0-20180821.1.el7ost.noarch rhosp-director-images-ipa-10.0-20190918.1.el7ost.noarch
-
Review the ironic node-list output to confirm the following statuses for each package::
-
Power state is power on.
-
Provision State is active.
-
Maintenance is False.
[stack@undercloud ~]$ ironic node-list +-------------------------------+----------+--------------+-------------+ | Name | Power | Provisioning | Maintenance | | | State | State | | +-------------------------------+----------+--------------+-------------+ | controller-3 | power on | active | False | | compute-5c5s35 | power on | active | False | | contrail-controller1 | power on | active | False | | contrail-analytics1 | power on | active | False | | contrail-controller-3 | power on | active | False | | contrail-controller-2 | power on | active | False | | contrail-analytics-database1 | power on | active | False | | controller-2 | power on | active | False | | controller1 | power on | active | False | | compute-5c5s37 | power on | active | False | | compute-5c5s36 | power on | active | False | | contrail-analytics-2 | power on | active | False | | contrail-analytics-3 | power on | active | False | | compute-5c5s38 | power on | active | False | | contrail-analytics-database-3 | power on | active | False | | contrail-analytics-database-2 | power on | active | False | +-------------------------------+----------+--------------+-------------+
Note:This output presentation has been modified for readability. The UUID and Instance UUID fields were removed as part of this modification.
-
-
Verify that all OpenStack servers are in the Active state.
[stack@undercloud ~]$ openstack server list +-------------------------------------------------+--------+ | Name | Status | +-------------------------------------------------+--------+ | overcloud-contrailanalytics-2-4-1-4-7-7 | ACTIVE | | overcloud-controller-0-4-1-4-7-7 | ACTIVE | | overcloud-contrailanalytics-0-4-1-4-7-7 | ACTIVE | | overcloud-contrailanalyticsdatabase-2-4-1-4-7-7 | ACTIVE | | overcloud-contrailanalytics-1-4-1-4-7-7 | ACTIVE | | overcloud-contrailanalyticsdatabase-0-4-1-4-7-7 | ACTIVE | | overcloud-contrailcontroller-1-4-1-4-7-7 | ACTIVE | | overcloud-contrailanalyticsdatabase-1-4-1-4-7-7 | ACTIVE | | overcloud-contrailcontroller-2-4-1-4-7-7 | ACTIVE | | overcloud-contrailcontroller-0-4-1-4-7-7 | ACTIVE | | compute-0-4-1-4-rhel-7-7 | ACTIVE | | overcloud-contraildpdk-0-4-1-4-7-7 | ACTIVE | | overcloud-contraildpdk-1-4-1-4-7-7 | ACTIVE | | compute-1-4-1-4-rhel-7-7 | ACTIVE | +-------------------------------------------------+--------+
Note:This output presentation has been modified for readability. The ID, Image Name, and Networks fields were removed as part of this modification.
-
If new image archives are available, replace your current images with the new images.
Before uploading the new images onto the undercloud node, move any existing images from the images directory on the stack user’s home directory (/home/stack/images).
$ mv /home/stack/images /home/stack/images-old
-
Extract the new image archives.
mkdir images cd images for i in /usr/share/rhosp-director-images/overcloud-full-latest-10.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-10.0.tar; do tar -xvf $i; done
-
Import the new image archives into the undercloud and configure the nodes to use the new images.
$ openstack overcloud image upload --update-existing --image-path /home/stack/images/
-
Verify that the images are uploaded:
$ glance image-list
-
Observe the contrail-status on all Contrail nodes. All services in the Contrail nodes, except the controller (OpenStack), should be up and running before proceeding with the upgrade.
[stack@undercloud ~]$ source stackrc [stack@undercloud ~]$ for i in $(nova list | grep contrail | awk '{print $12}' | cut -d '=' -f2); do ssh heat-admin@$i sudo contrail-status; done
-
Ensure that all overcloud node contrail repository pointers are properly pointing to the contrail repository.
Contrail Analytics Example:
[root@overcloud-contrailanalytics-0 heat-admin]# cat /etc/yum.repos.d/contrail.repo [Contrail] name=Contrail Repo baseurl=http://192.168.24.1/contrail enabled=1 gpgcheck=0 protect=1 metadata_expire=30
Update Red Hat Director Image Archives
The undercloud update process might download new image archives from the rhosp-director images and the rhosp-director-ipa packages. You will have to update your existing system with any new image archives.
-
Check the yum log to determine if new image archives are available.
$ sudo grep "rhosp-director-images" /var/log/yum.log
[stack@undercloud]$ sudo grep "rhosp-director-images" /var/log/yum.log Dec 12 15:09:20 Installed: rhosp-director-images-ipa-10.0-20190918.1.el7ost.noarch Dec 12 15:10:10 Installed: rhosp-director-images-10.0-20190918.1.el7ost.noarch
-
If new image archives are available, replace your current images with the new images. Before deploying any new images, remove any existing images from the images undercloud on the stack user’s home (/home/stack/images).
$ rm -rf ~/images/*
-
Extract the new image archives.
mkdir images cd images for i in /usr/share/rhosp-director-images/overcloud-full-latest-10.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-10.0.tar; do tar -xvf $i; done
-
Install the Contrail package on the overcloud image by using the virt-customize command.
export LIBGUESTFS_BACKEND=direct /usr/bin/virt-customize -a /home/stack/images/overcloud-full.qcow2 \ -copy-in /etc/yum.repos.d/mylocalrepo.repo:/etc/yum.repos.d \ -run-command 'yum -y install puppet-tripleo contrail-tripleo-puppet puppet-contrail‘\ -run-command ‘ cp -r /usr/share/contrail-tripleo-puppet/ /usr/share/openstack-puppet/modules/tripleo/ ‘ \ -run-command 'rm -fr /var/cache/yum/*' \ -run-command 'yum clean all' \ -selinux-relabel
-
Import the new image archives into the undercloud and configure nodes to use the new images.
$ openstack overcloud image upload -update-existing -image-path /home/stack/images/
-
Verify that the images are uploaded.
$ openstack image list
-
Show the details of the new image that has been created. The new image will be used to add a new node in the overcloud.
$ openstack image show overcloud-full
-
Verify
contrail-status
on all Contrail nodes. All services in the Contrail nodes, except the controller (OpenStack), should be up and running before proceeding with the upgrade.[stack@undercloud ~]$ for i in $(nova list | grep contrail | awk '{print $12}' | cut -d '=' -f2); do ssh heat-admin@$i sudo contrail-status; done
Upgrade the Operating System on Contrail Nodes
To upgrade the operating system on Contrail nodes:
-
Define a list ($iplist) that contains all Contrail nodes. Run the following command on undercloud VM as a stack user.
Iplist=” @IPcontrailController1 @IPContrailController2 …”
CAUTION:Attach the new satellite subscription key on all overcloud nodes before upgrading the overcloud packages. Satellite must be synced with filter end date 9th Dec 2019. Make sure to clear cache by typing sudo yum clean all.
-
Upgrade the operating system for all nodes in the iplist.
Run the following command on undercloud VM as a stack user:
sudo for ipnode in $iplist; do echo -e "\n\n\t******upgrade node : $ipnode ******" && ssh heat-admin@$ipnode 'sudo yum update -y --disablerepo=*contrail* --skip-broken && exit' ; done
-
(Compute nodes only) Reboot overcloud contrail compute nodes. After the reboot, stop the supervisor-vrouter service.
This step needs to be performed before installing contrail packages on the compute VM.
Compute services may go down after rebooting with the latest kernel. These services return later in this procedure during the openstack overcloud deploy process.
Reboot Procedure:
[root@compute-1-7-6 modules]# sudo reboot Connection to 192.0.2.16 closed by remote host. Connection to 192.0.2.16 closed.
Post-Reboot:
[stack@undercloud-R4-1-2-b22 ~]$ ssh heat-admin@192.0.2.16 Warning: Permanently added '192.0.2.16' (ECDSA) to the list of known hosts. Last login: Sat Dec 7 03:46:07 2019 from gateway [heat-admin@compute-1-7-6 ~]$ sudo su [root@compute-1-7-6 heat-admin]# contrail-status vRouter is NOT PRESENT == Contrail vRouter == supervisor-vrouter: active contrail-vrouter-agent initializing contrail-vrouter-nodemgr initializing
Stop the supervisor-vrouter service:
[root@compute-1-7-6 heat-admin]# service supervisor-vrouter stop Stopping supervisor-vrouter (via systemctl): [ OK ] [root@compute-1-7-6 heat-admin]# contrail-status vRouter is NOT PRESENT == Contrail vRouter == supervisor-vrouter: inactive unix:///var/run/supervisord_vrouter.sockno
Prepare the Contrail Packages
Check the undercloud Contrail packages versions for
contrail-tripleo-puppet
, puppet-contrail
, and
contrail-tripleo-heat-templates
.
[stack@undercloud~]$ rpm -qa | grep contrail
Upgrade the Contrail Heat Templates
You must copy the new Contrail Heat templates package to the undercloud node, while retaining a copy of the Heat templates that were used for the existing deployment.
-
Make a copy of all of the Heat templates that were used for deployment and save the copies, because the existing files will be overwritten by the new versions. The templates to copy are of the form contrail-services.yaml, contrail-net.yaml, and so on.
Note:Red Hat does not support changing IP address of the existing cluster as a part of upgrade. Do not change IP address of the cluster while creating new tripleo-heat-templates
-
Copy the new contrail-tripleo-heat templates to the undercloud node.
sudo cp -r /usr/share/contrail-tripleo-heat-templates/environments/contrail /home/stack/tripleo-heat-templates/environments/ sudo cp -r /usr/share/contrail-tripleo-heat-templates/puppet/services/network/* /home/stack/tripleo-heat-templates/puppet/services/network
Note:The directory /home/stack/tripleo-heat-templates is user defined, it can be User Defined-directory>/openstack-tripleo-heat-templates
Modify the Yum Update Script for TripleO Puppet
Following Puppet commands must be added to the yum_update
script before
starting the upgrade. The script is located at:
/home/stack/tripleo-heat-templates/extraconfig/tasks/yum_update.sh
-
Update the following Puppet commands in the
yum_update.sh
after the line“echo -n "false" > $heat_outputs_path.update_managed_packages”
.Refer to the following patch for details regarding the exact placement of the commands patch: https://github.com/Juniper/contrail-tripleo-heat-templates/blob/stable/newton/environments/contrail/yum_updates.patch
yum install -y contrail-tripleo-puppet puppet-contrail
rsync -a /usr/share/contrail-tripleo-puppet/ /usr/share/openstack-puppet/modules/tripleo/
-
Update the fields
*contrail version
and*contrail repo
incontrail-services.yaml
.Default parameter for
contrailVersion
is 4.Filename:/home/stack/tripleo-heat-templates/environments/contrail/contrail-services.yaml.
Add the following parameters:
ContrailVersion: 4
ContrailRepo : <location of the contrail-41 repo>
Note:/home/stack/tripleo-heat-templatesdirectory is user defined and it can be directory name under stack user.
Update the Overcloud Deployment Plan
-
Update the current plan by re-running the command used for cloud deployment and adding the suffix
- -update-plan-only
.openstack overcloud deploy –update-plan-only
Example:
openstack overcloud deploy --update-plan-only --templates /home/stack/tripleo-heat-templates/ \ --roles-file /home/stack/tripleo-heat-templates/environments/contrail/roles_data.yaml \ -e /home/stack/tripleo-heat-templates/environments/puppet-pacemaker.yaml \ -e /home/stack/tripleo-heat-templates/environments/contrail/contrail-services.yaml \ -e /home/stack/tripleo-heat-templates/environments/contrail/network-isolation.yaml \ -e /home/stack/tripleo-heat-templates/environments/contrail/contrail-net.yaml \ -e /home/stack/tripleo-heat-templates/environments/ips-from-pool-all.yaml \ -e /home/stack/tripleo-heat-templates/environments/network-management.yaml \ -e /home/stack/tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml \ -e /home/stack/tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml \ --libvirt-type qemu
-
Make a copy of the existing deploy script to the
update-stack.sh
. Theupdate-stack.sh
is the script used to update the overcloud plan, and it references the same templates that were used to deploy the stack. All files used for the overcloud update should be identical to the files used for deployment, exceptcontrail-services
file that was updated with the latestcontrail-version
andcontrail-repo
.cp deploy.sh update-stack.sh
-
Update the deployment plan.
./update-stack.sh
Example:
[stack@undercloud ~]$ ./update-stack.sh nRemoving the current plan files Uploading new plan files Started Mistral Workflow. Execution ID: 998a1b40--a034-8cff453acfb1 Plan updated Deploying templates in the directory /tmp/tripleoclient-JulIDe/tripleo- heat-templates Overcloud Endpoint: http://10.0.0.35:5000/v2.0 Overcloud Deployed
Upgrade the Overcloud
The steps in this section are service disrupting, and should only be performed within a maintenance window.
-
Update the overcloud stack.
$ openstack overcloud update stack -i overcloud on_breakpoint: [u'overcloud-contrailanalyticsdatabase-0'] Breakpoint reached, continue? Regexp or Enter=proceed (will clear 4386bdc7-5087-4a4d-865c-0b0181ce9345), no=cancel update, C-c=quit interactive mode: IN_PROGRESS IN_PROGRESS IN_PROGRESS IN_PROGRESS IN_PROGRESS COMPLETE update finished with status COMPLETE
-
Verify the overcloud
stack status
, thecontrail-status
, and thecontrail-version
after the upgrade.Overcloud Stack Status
[stack@undercloud ~]$ openstack stack list +------------+-----------------+----------------------+----------------------+ | Stack Name | Stack Status | Creation Time | Updated Time | +------------+-----------------+----------------------+----------------------+ | overcloud | UPDATE_COMPLETE | 2019-12-06T23:30:26Z | 2019-12-09T22:40:01Z | +------------+-----------------+----------------------+----------------------+
Note:The openstack stack list output presentation has been modified for readability. The ID field was removed as part of this modification.
Contrail Stack Status
sudo for i in $(nova list | grep contrail | awk '{print $12}' | cut -d '=' -f2); do ssh heat-admin@$i sudo contrail-status; done
Contrail Version Check
for i in $(nova list | grep contrail | awk '{print $12}' | cut -d '=' -f2); do ssh heat-admin@$i sudo contrail-version; ssh heat-admin@$i sudo contrail-status -d ; done
Upgrade Cautions
The steps to perform the overcloud upgrade are service disrupting, and should only be performed within a maintenance window.
The upgrade procedure may fail due to packages conflicts in Contrail analytics nodes. Some observed failures due to packages conflicts are detailed in this section. Continue with the deployment after applying the recommended solution.
Analytics Node snmp-lib Version Conflict
Error message: Protected multilib versions: 1:net-snmp-libs-5.7.2-37.el7.x86_64
!= 1:net-snmp-libs-5.7.2-33.el7_5.2.i686
Solution:
rpm -e --nodeps net-snmp-libs
Services Need Manual Restart After Upgrade
Services may need to be restarted after performing this upgrade. The services might continue to run using Contrail 4.1.3-related processes for a period of time.
Enter the contrail-status command to see if the processes continued to run through the upgrade, and monitor the warning messages that appear.
Manually restart the services if you run into this issue.
In the following example, this issue is seen for the Contrail Analytics services immediately after the upgrade:
[heat-admin@overcloud-contrailanalytics ~]$ sudo contrail-status -d Warning: supervisor-analytics.service changed on disk. Run 'systemctl daemon-reload' to reload units. == Contrail Analytics == supervisor-analytics: active contrail-alarm-gen active pid 975462, uptime 15 days, 19:07:11 contrail-analytics-api active pid 127224, uptime 20 days, 19:48:28 contrail-analytics-nodemgr active pid 127219, uptime 20 days, 19:48:28 contrail-collector active pid 127222, uptime 20 days, 19:48:28 contrail-query-engine active pid 127223, uptime 20 days, 19:48:28 contrail-snmp-collector active pid 127220, uptime 20 days, 19:48:28 contrail-topology active pid 127221, uptime 20 days, 19:48:28