Updating Undercloud Components

Note

Instack-undercloud is deprecated as of the Rocky cycle. Instack undercloud can only be upgraded to a containerized undercloud. See Containers based Undercloud Deployment for backward compatibility related information.

Note

When updating the existing containerized undercloud installation, keep in mind the special cases described in Understanding undercloud/standalone stack updates.

  1. Before upgrading the undercloud, it is highly suggested to perform a backup of the undercloud and validate that a restore works fine.

  2. Remove all Delorean repositories:

    Note

    You may wish to backup your current repos before disabling them

    mkdir -p /home/stack/REPOBACKUP
    sudo mv /etc/yum.repos.d/delorean* /home/stack/REPOBACKUP
    
    sudo rm /etc/yum.repos.d/delorean*
    
  3. Enable new Delorean repositories:

    Note

    Python3 is required for Ussuri and newer releases of OpenStack which is supported on RHEL 8 and CentOS 8. Train is also recommended to be installed on RHEL 8 or CentOS 8.

    1. Download and install the python-tripleo-repos RPM from the appropriate RDO repository

      CentOS 8 and CentOS Strem 8

      Current Centos 8 RDO repository.

      sudo dnf install -y https://trunk.rdoproject.org/centos8/component/tripleo/current/python3-tripleo-repos-<version>.el8.noarch.rpm
      

      Note

      tripleo-repos removes any repositories that it manages before each run. This means all repositories must be specified in a single tripleo-repos call. As an example, the correct way to install the current and ceph repos is to run tripleo-repos current ceph, not two separate calls.

      Stable Branch

      Enable the appropriate repos for the desired release, as indicated below. Do not enable any other repos not explicitly marked for that release.

      Wallaby

      Enable the current Wallaby repositories

      sudo -E tripleo-repos -b wallaby current
      

      Ceph

      Include the Ceph repo in the tripleo-repos call

      sudo -E tripleo-repos -b wallaby current ceph
      

      Victoria

      Enable the current Victoria repositories

      sudo -E tripleo-repos -b victoria current
      

      Ceph

      Include the Ceph repo in the tripleo-repos call

      sudo -E tripleo-repos -b victoria current ceph
      

      Ussuri

      Enable the current Ussuri repositories

      sudo -E tripleo-repos -b ussuri current
      

      Ceph

      Include the Ceph repo in the tripleo-repos call

      sudo -E tripleo-repos -b ussuri current ceph
      

      Train

      Enable the current Train repositories

      sudo -E tripleo-repos -b train current
      

      Ceph

      Include the Ceph repo in the tripleo-repos call

      sudo -E tripleo-repos -b train current ceph
      

    Warning

    The remaining repositories configuration steps below should not be done for stable releases!

    1. Run tripleo-repos to install the appropriate repositories. The option below will enable the latest master TripleO packages, the latest promoted packages for all other OpenStack services and dependencies and the latest stable Ceph packages. There are other repository configurations available in tripleo-repos, see its --help output for details.

      sudo -E tripleo-repos current-tripleo-dev ceph
      
  1. Clean the yum cache to ensure only the new repos are used

    sudo yum clean all
    sudo rm -rf /var/cache/yum
    
  2. Update required package:

    Validations

    It is strongly recommended that you validate the state of your undercloud before starting any upgrade operations. The tripleo-validations repo has some ‘pre-upgrade’ validations that you can execute by following the instructions at validations to execute the “pre-upgrade” group

    openstack tripleo validator run --group pre-upgrade
    

    Newton to Ocata

    The following commands need to be run before the undercloud upgrade:

    sudo systemctl stop openstack-*
    sudo systemctl stop neutron-*
    sudo systemctl stop openvswitch
    sudo systemctl stop httpd
    sudo yum update instack-undercloud openstack-puppet-modules openstack-tripleo-common
    

    Ocata to Pike

    Ceph

    Prior to Pike, TripleO deployed Ceph with puppet-ceph. With the Pike release it is possible to use TripleO to deploy Ceph with either ceph-ansible or puppet-ceph, though puppet-ceph is deprecated. To use ceph-ansible, the CentOS Storage SIG Ceph repository must be enabled on the undercloud and the ceph-ansible package must then be installed:

    sudo yum install --enablerepo=extras centos-release-ceph-jewel
    sudo yum install ceph-ansible
    

    Ceph clusters deployed with Ocata via puppet-ceph will be migrated so that all of the existing Ceph services are run inside of containers. This migration will be managed not by puppet-ceph, but by ceph-ansible, which TripleO will use to control updates to the same ceph cluster after the Ocata to Pike upgrade.

    Update TripleO CLI and dependencies

    sudo yum update python-tripleoclient* openstack-tripleo-common openstack-tripleo-heat-templates
    
  3. As part of the undercloud install, an image registry is configured on port 8787. This is used to increase reliability of overcloud image pulls, and minimise overall network transfers. First it is highly suggested to perform a backup of the initial containers-prepare-parameter.yaml file. Then update the new containers-prepare-parameter.yaml file with the same modifications made in the initial one:

    openstack tripleo container image prepare default \
      --local-push-destination \
      --output-env-file ~/containers-prepare-parameter.yaml
    

    Note

    This command is available since Rocky.

  4. Run the undercloud upgrade command. This command will upgrade all packages and use puppet to apply new configuration and restart all OpenStack services

    openstack undercloud upgrade
    

    Note

    The undercloud is containerized by default as of Rocky. Therefore, an undercloud deployed on Queens (non-containerized) will be upgraded to a containerized undercloud on Rocky, by default. To upgrade with instack undercloud in Rocky, you’ll need to upgrade with --use-heat=False option. Note this isn’t tested and not supported.

    Note

    It’s possible to enable verbose logging with --verbose option. To cleanup an undercloud after its upgrade, you’ll need to set upgrade_cleanup to True in undercloud.conf. It’ll remove the rpms that were deployed by instack-undercloud, after the upgrade to a containerized undercloud.

    Note

    If you added custom OVS ports to the undercloud (e.g. in a virtual testing environment) you may need to re-add them at this point.