Upgrade Ubuntu on the XCO Host - Single Node or Multi Node

Upgrade Ubuntu in single-node and multi-node deployments.

Before you begin

  • Ensure that XCO is at release 3.2.1 or later.
  • Ensure that the nodes are healthy and XCO services are up and running.

About this task

XCO is supported on Ubuntu 16.04, 18.04, and 20.04 as described in Supported Platforms and Deployment Models for Fabric Skill. You can upgrade from 16.04 to 18.04 and from 18.04 to 20.04 while XCO is installed.

Follow this procedure to upgrade Ubuntu from 18.04 to 20.04.

Note

Note

Procedure

  1. Take a database backup.
    1. If you already have XCO running on Ubuntu version lower than 20.04, take a backup of XCO.
      For more information on XCO backup, see Backup Database.
      $ efa system backup
      Generating backup of EFA...
      Backup Location: /var/log/efa/backup/EFA-3.2.1-GA-2023-03-23T13-25-55.105.tar
      --- Time Elapsed: 37.543063336s ---
    2. Copy the generated backup archive to a remote server.

If you are on a multi-node deployment, complete the remaining steps on both the nodes.

  1. Ensure that XCO is working before proceeding with OS upgrade

    On the secondary node, complete the following upgrade procedure:

  2. Run the following script located in the /opt/efa directory to un-hold packages installed by XCO:
    # opt/efa$ sudo bash package-manager.sh --unhold
    Started unholding the packages used by application
    Unholding perl
    Unholding mariadb client
    Unholding mariadb server
    Unholding glusterfs
    Unholding keepalived
    Unholding litestream
    Completed unholding the packages used by application
  3. Run the following command to ensure that there are no packages on hold:
    # sudo dpkg --get-selections | grep hold

    To un-hold the packages, run the following command.

    # sudo apt-mark unhold <package-name>
    *keep a note of these packages

    Make a note of packages that were still held even after running the script.

  4. Update the Ubuntu package database, and then update all the Ubuntu packages on all the available nodes.
    # sudo apt update && sudo apt upgrade -y
    • The script upgrades all the packages to the latest 18.04 version.
    • If needed, perform a reboot after the upgrade.
  5. Upgrade the Ubuntu package to 20.04 on all the available nodes.
    # sudo do-release-upgrade
    • If needed, perform a reboot after the upgrade.
    • After Ubuntu is upgrade, wait for XCO pods and services to come up.
  6. Perform all the upgrade steps (from step 6 to step 9) on the active node, and reboot at step 8 for failover.

    Once both the nodes are upgraded, complete the following steps:

  7. Verify that the nodes are at the new version by running the cat /etc/os-release command.
    # cat /etc/os-release  
    NAME="Ubuntu" 
    VERSION="20.04.6 LTS (Focal Fossa)" 
    ID=ubuntu 
    ID_LIKE=debian 
    PRETTY_NAME="Ubuntu 20.04.6 LTS" 
    VERSION_ID="20.04" 
    HOME_URL="https://www.ubuntu.com/" 
    SUPPORT_URL="https://help.ubuntu.com/" 
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" 
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" 
    VERSION_CODENAME=focal 
    UBUNTU_CODENAME=focal
  8. Verify that XCO is up and running on both the nodes. Perform the following (from the XCO command line) on both nodes.
    • Run efa status to verify that both nodes are up.
    • Run sudo efactl status to verify that all pods on the active node are in Running state.
    • Run sudo efactl db-status to verify that the MariaDB is active (running)
  9. Run the following command to hold back the packages after upgrade.
    # opt/efa$ sudo bash package-manager.sh --hold  
    Starting hold on packages used by application
    Holding perl
    Holding mariadb client
    Holding mariadb server
    Holding glusterfs
    Holding keepalived
    Holding litestream
    Completed running the hold on packages used by application
  10. Run the following command to verify whether the packages are held:
    # sudo dpkg --get-selections | grep hold |wc -l
    57
  11. (Skip this step if no packages were un-held in step 7) Hold the packages that were manually un-held in step 7.
    # sudo apt-mark hold <package-name>