Upgrade Calico on OpenStack
Calico package update​
This page describes how to upgrade to v3.31 from Calico v3.0 or later. The procedure varies by Linux distribution.
Do not use older versions of calicoctl after the upgrade.
This may result in unexpected behavior and data.
Upgrading an OpenStack cluster based on CentOS​
-
On all nodes, change the location of the Calico packages to point to the v3.31 repo:
sudo sed -i 's/calico-X.X/calico-Y.Y/g' /etc/yum.repos.d/calico.repoReplace
X.Xin the above command with the version you're upgrading from (must be v3.0 or later). ReplaceY.Ywith the version of the release you're upgrading to. Example: if you are upgrading from v3.1 to v3.5, replaceX.Xwith3.1and replaceY.Ywith3.5. -
On all compute nodes, update packages:
sudo yum updateWe recommend upgrading the whole distribution as shown here. In case you prefer to upgrade particular packages only, those needed for a Calico compute node are the following.
calico-commoncalico-computecalico-dhcp-agentcalico-felixdnsmasqnetworking-calicoopenstack-neutronopenstack-nova-apiopenstack-nova-compute
-
Use the following command on the compute nodes to confirm that Felix has upgraded to v3.31.
calico-felix --versionIt should return
v3.31. -
On all compute nodes, add the following line to the end of
/etc/calico/felix.cfg:DatastoreType = etcdv3If you need to change the EtcdEndpoints address (e.g. because you've installed a new etcdv3 cluster rather than upgrading your existing etcdv2 cluster), you should update the EtcdEndpoints addresses in
/etcd/calico/felix.cfgat this point. -
On all control nodes, update packages:
sudo yum updateWe recommend upgrading the whole distribution as shown here. In case you prefer to upgrade particular packages only, those needed for a Calico control node are the following.
calico-commoncalico-controlnetworking-calicoopenstack-neutron
-
On all control nodes, restart
neutron-server:sudo systemctl restart neutron-server -
If you ran
calico-upgradeearlier to migrate non-openstack data, on the control node run:calico-upgrade complete -
Remove any existing
calicoctlinstances and install the newcalicoctl. -
Congratulations! You have upgraded to Calico v3.31.
Upgrading an OpenStack cluster based on Ubuntu​
-
On all nodes, change the location of the Calico packages to point to the v3.31 repo:
sudo bash -c 'cat > /etc/apt/sources.list.d/project-calico-calico-X_X-trusty.list' << EOF
deb http://ppa.launchpad.net/project-calico/calico-X.X/ubuntu trusty main
# deb-src http://ppa.launchpad.net/project-calico/calico-X.X/ubuntu trusty main
EOFReplace
X_XandX.Xwith the version you're upgrading to. Example: if you're upgrading to v3.5, replaceX_Xwith3_5and replaceX.Xwith3.5. Also replacetrustywith the code name of your Ubuntu version. -
On all compute nodes, update packages:
sudo apt-get update
sudo apt-get install calico-compute calico-felix calico-common \
python-etcd networking-calico calico-dhcp-agent -
Use the following command on the compute nodes to confirm that Felix has upgraded to v3.31.
calico-felix --versionIt should return
v3.31. -
On all compute nodes, add the following line to the end of
/etc/calico/felix.cfg:DatastoreType = etcdv3If you need to change the EtcdEndpoints address (e.g. because you've installed a new etcdv3 cluster rather than upgrading your existing etcdv2 cluster), you should update the EtcdEndpoints addresses in
/etcd/calico/felix.cfgat this point. -
On all control nodes, update packages:
sudo apt-get update
sudo apt-get install calico-control calico-common python-etcd networking-calico -
On all control nodes, restart
neutron-server:sudo service neutron-server restart -
If you ran
calico-upgradeearlier to migrate non-openstack data, on the control node run:calico-upgrade complete -
Remove any existing
calicoctlinstances and install the newcalicoctl. -
Congratulations! You have upgraded to Calico v3.31.