Upgrade the Ceph Version in Rook Ceph

About this task

This section describes how to upgrade the Ceph version used by the Rook Ceph application on StarlingX systems.

Prerequisites

  • When upgrading the Ceph version, it is recommended to stop all applications using Ceph, as active workloads may experience errors during the upgrade process.

  • On AIO-SX, Standard, and AIO-DX + worker systems (without a floating monitor), you may need to manually upload the Ceph images to the local registry before proceeding.

AIO-SX, Standard, and AIO-DX+ (Without Floating Monitor)

  1. Create environment variables containing Ceph’s image :

    CEPH_IMAGE=quay.io/ceph/ceph:v19.2.3
    
  2. Create the override file for the rook-ceph-cluster chart:

    cat <<EOF > ceph-version-override.yaml
    cephClusterSpec:
      cephVersion:
        image: ${CEPH_IMAGE}
    toolbox:
      image: ${CEPH_IMAGE}
    EOF
    
  3. Configure the user override for the rook-ceph-cluster chart:

    $ system helm-override-update rook-ceph rook-ceph-cluster rook-ceph --values ceph-version-override.yaml
    
  4. Verify the user override was properly applied:

    $ system helm-override-show rook-ceph rook-ceph-cluster rook-ceph
    
  5. Apply the Rook Ceph application:

    $ system application-apply rook-ceph
    

    Note

    On systems with several OSDs, this operation may take a significant amount of time. It is recommended to stop any active workloads using Ceph before applying. Continue to the next step only after the application status shows applied.

  6. Wait for the upgrade to finish. Verify that all components are running the assigned version:

    $ ceph versions
    

AIO-DX (With Floating Monitor)

  1. Remove the floating monitor:

    $ system controllerfs-modify ceph-float --functions=
    $ system application-apply rook-ceph
    
  2. Create environment variables containing Ceph’s image and version:

    CEPH_IMAGE=quay.io/ceph/ceph:v19.2.3
    CEPH_VERSION=19.2.3-0
    
  3. Create the override file for the rook-ceph-cluster chart:

    cat <<EOF > ceph-version-override.yaml
    cephClusterSpec:
      cephVersion:
        image: ${CEPH_IMAGE}
    toolbox:
      image: ${CEPH_IMAGE}
    EOF
    
  4. Configure the user override for the rook-ceph-cluster chart:

    $ system helm-override-update rook-ceph rook-ceph-cluster rook-ceph --values ceph-version-override.yaml
    
    1. Verify the override is properly applied:

      $ system helm-override-show rook-ceph rook-ceph-cluster rook-ceph
      
  5. Apply the Rook Ceph application:

    $ system application-apply rook-ceph
    

    Note

    Continue to the next step only after the application status shows applied.

  6. Add a temporary additional monitor to the system:

    $ kubectl patch cephcluster -n rook-ceph rook-ceph --type=merge \
        -p '{"spec":{"mon":{"allowMultiplePerNode":true, "count":3}}}'
    
    1. Restart the operator:

      $ kubectl rollout restart deployment -n rook-ceph rook-ceph-operator
      
    2. Wait until the new monitor appears:

      $ ceph -s
      
  7. Wait for the upgrade to finish. Verify that all components are running the assigned version:

    $ ceph versions
    
  8. Remove the temporary additional monitor:

    $ kubectl patch cephcluster -n rook-ceph rook-ceph --type=merge \
        -p '{"spec":{"mon":{"allowMultiplePerNode":false, "count":2}}}'
    
    1. Wait until the additional monitor is removed:

      $ ceph -s
      
  9. Create the override file for the rook-ceph-floating-monitor chart:

    cat <<EOF > ceph-version-floating-override.yaml
    images:
      tags:
        ceph: $CEPH_IMAGE
    EOF
    
  10. Configure the user override for the rook-ceph-floating-monitor chart:

    $ system helm-override-update rook-ceph rook-ceph-floating-monitor rook-ceph --values ceph-version-floating-override.yaml
    
  11. Restore the floating monitor:

    $ system controllerfs-modify ceph-float --functions=monitor
    $ system application-apply rook-ceph
    
  12. After the system is up, verify the Ceph versions:

    $ kubectl describe deployment -n rook-ceph | grep ceph-version
    $ ceph versions