Upgrading Ubuntu 22.04 to Ubuntu 24.04

This guide is intended for all AppViewX customers that are currently using Ubuntu 22.04 operating system. It offers step-by-step instructions for transitioning from Ubuntu 22.04 to Ubuntu 24.04, covering essential pre-upgrade preparations, updating packages, configuring necessary repositories, and resolving compatibility issues with deprecated modules for a seamless upgrade. This process applies specifically to AppViewX-shipped OVAs.

Note: For CC nodes, it is recommended to use a blue-green deployment approach. Deploy a new VM using the OVA of the required version, and then reinstall the CC. This approach is easier because it avoids the complexity of performing an in-place OS upgrade, ensuring a cleaner and more controlled transition to the new version.

Pre-Upgrade Considerations

Before starting the upgrade, ensure the following are addressed:
  • Backup: Take a VM snapshot before starting the upgrade to enable rollback in case of issues.
  • Internet Connectivity: Ensure the node has internet or proxy access to download the OS update from repos.appviewx.com.
  • Disk Space: Verify that at least 3GB of free space is available in the root (/) partition.
  • Current Version Check:Confirm that the system is running Ubuntu 22.04 by executing the following command:
    • lsb_release -a

Prerequisite

  1. Stop AppViewX on All Nodes (On-Premise Setups Only).
    Note: This step is applicable only to on-premise setups. Cloud Connectors (CC) do not require component stoppage.
    1. Log in to the AppViewX installer node and navigate to the appviewx_kubernetes/scripts directory.
    2. If you are upgrading the OS with a downtime, then use the following command to stop the AppViewX on all the nodes.
      1. For single-node:
        ./appviewx.sh --stop <hostname>
      2. For multi-node:
        ./appviewx.sh --stop -all
    3. If you are upgrading the OS without a downtime, then use the following command to stop the AppViewX nodes.
      • For multi-node - This applies only to multi-node clusters. For multi-master clusters, ensure that the master load balancer is properly configured to prevent downtime.
        ./appviewx.sh –stop <hostname>
      • Before proceeding to the next node, upgrade the OS and verify that the components are running on the node using:
        kubectl get pods -A -o wide | grep -i <hostname>
      Note: Use VMware Console access for this upgrade. If upgrading over SSH, use "screen" or "tmux" to prevent interruptions in case of disconnection.
  2. Check if the tmux package is installed on your node. If not, install it using
    sudo apt install tmux
  3. Attach to a tmux session by running:
    tmux
  4. If console=null is found in /etc/default/grub, remove it.

    Once console=null is removed, execute the below command.

    sudo update-grub
  5. Take a backup of the contents of /etc/resolv.conf from all the nodes.

Preparing for the Upgrade

To prepare for the upgrade, update all installed packages on Ubuntu 22.04. Execute the following commands:
  • sudo apt update -y
  • sudo apt upgrade -y
    Note: If there is an error on executing the above command as shown below then execute the following command:
    sudo apt --fix-broken install -y
    After the apt --fix-broken install command executes successfully, execute the apt upgrade command once again.
    sudo apt upgrade -y
  • sudo apt full-upgrade

Configuring the AppViewX Repository

  1. Validate the authentication for the repos.appviewx.com repository using the command below.
    cat /etc/apt/auth.conf
  2. Create a new APT Repository; add the AppViewX repository for Ubuntu 24.04 (Noble Numbat).
    sudo vi /etc/apt/sources.list.d/appviewx_repo-noble.sources
    Note: Ensure that there is an empty line without any white spaces in it.
    Add the following lines to the file:
    # AppViewX APT repository
    Types: deb
    URIs: https://repos.appviewx.com/repository/ubuntu/
    Suites: noble noble-updates noble-backports
    Components: main restricted universe multiverse
    Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
    
    Types: deb
    URIs: https://repos.appviewx.com/repository/ubuntu/
    Suites: noble-security
    Components: main restricted universe multiverse
    Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
    

Disabling Auditd Service

To avoid issues with the auditd service causing CPU lockups due to a problem in certain kernel versions of Ubuntu 22, execute the following commands:

sudo systemctl stop auditd.service
sudo systemctl disable auditd.service
Post executing, ensure that the auditd.service is stopped and disabled.

Handling Deprecated Modules

To avoid issues with deprecated pam_tally and pam_tally2 modules, replace them with pam_faillock using the following commands:
cd /etc/pam.d
sudo sed -i 's/pam_tally2\?/pam_faillock/g' /etc/pam.d/*