Document navigation

Applicable scenario

  • Product: ZCF
  • Components: ZCE-X, Cloud
  • ZCE-X version: 5.2.x
  • Connected ZStack Cloud version: ZStack Cloud 4.4.x
  • ZStackCube version: Upgrade ZStackCube 2.2.x to 2.4.x
  • Current versions:
  • ZStackCube 2.2.x
  • ZCE-X 5.2.x
  • Cloud 4.4.x
  • qemu 4.2.x
  • libvirt 4.9.x
  • Target versions:
  • ZStackCube 2.4.x
  • ZCE-X 5.2.x
  • qemu 6.2.x
  • libvirt 8.0.x
  • Operating system: C76
  • Deployment topology: 1 cluster, 10 physical hosts, 1 primary storage
  • Trigger: File storage writes are slow, and a transition upgrade to 5.2.x is required before a future V6 storage upgrade.

Symptoms

  • The environment uses old versions.
  • File storage writes are slow.
  • The platform, virtualization components, and storage require coordinated upgrades.

Determination method

  1. Before upgrade, confirm platform, Ceph, etcd, ES, Postgres synchronization, host resources, and passwordless access are normal.
  2. After platform upgrade, check management nodes, hosts, primary storage, image servers, and VMs.
  3. After storage upgrade, check ceph -s, xms-cli -v, xdc, xmsd, docker ps, and UI modules.

Cause

Slow file storage is one cause, and the storage side is recommended for future V6 upgrade. The current version cannot upgrade directly to V6, so first upgrade platform and storage to supported transition versions.

Resolution

  1. Preparation
  • Risk level: high.
  • Put platform resources in maintenance mode and disable global VM HA.
  • Run pre_upgrade_self_check before platform upgrade.
  • Stop all backup tasks.
  • Back up dual-management databases and the zstack-upgrade script.
  • Before qemu upgrade, clear possible running qemu-nbd on the backup server.
  1. Grayscale-upgrade ZStackCube to 2.4.x
  2. Run pre_upgrade_self_check.
  • Expected result: Cross-version upgrade risks are identified.
  1. Disable global HA and choose one non-critical physical host for first reconnection validation.
  2. Upload ISO, upgrade package, HA components, and bin files to both management nodes, then verify md5 and zsha2 commit.
  3. Modify /etc/my.cnf:
   wait_timeout=28800
   interactive_timeout=28800

Then restart mariadb.service.

  1. Back up databases on both management nodes:
   zstack-ctl dump_mysql --file-name mn1
   zstack-ctl dump_mysql --file-name mn2
   cp /usr/local/bin/zstack-upgrade /root/zstack-upgrade-bk
  1. Update the repository:
   bash zstack-upgrade -r Cube-x86_64-DVD-2.4.17-c76-Enterprise-upgrade-241024.iso
  1. Query the VIP node:
   zsha2 status
  1. Extract the HA package and grant permissions:
   tar zxvf ZStack-Cube-Multinode-HA-Suite-2.4.17.tar.gz
   chmod +x zsha2 zstack-hamon
  1. Stop MN services and upgrade HA:
   zsha2 stop-node
   ./zsha2 upgrade-ha -gencfg=true
  1. Grayscale-upgrade ZStackCube:
    zsha2 upgrade-mn -grayscale -yes xx.bin
  1. Check after upgrade:
    zstack-ctl status
    zsha2 status
  1. Log in to the UI, check resource state, and reconnect the non-critical host first.
  2. Check agent versions:
    zstack-cli QueryAgentVersion
  1. On Ceph storage, check:
  • ceph -s
  • Firewall state
  • Physical-host-to-Ceph network connectivity
  • Heartbeat-volume access
  1. Reconnect remaining physical hosts in sequence after no exception.
  2. Disable grayscale variables and enable global HA.
  • Expected result: Platform upgrade completes.
  1. Upgrade qemu/libvirt/glib2 components
  2. Stop all backup tasks. If backup processes are running, run on the backup server:
   pkill qemu-nbd
  1. Upgrade one physical host first:
  • qemu-storage-daemon
  • qemu-kvm
  • glib2
  • libvirt
  1. Upgrade remaining physical hosts only after single-host validation succeeds.
  2. Query progress with QueryLongJob.
  3. Restart or migrate VMs after upgrade to load the new qemu.
  4. Check VM qemu version:
   virsh qemu-monitor-command $VMuuid --hmp info version
  • Expected result: Virtualization component upgrade completes.
  1. Offline-upgrade ZCE-X to 5.2.x
  2. Before upgrade, confirm:
  • ceph -s is healthy
  • etcd is healthy
  • ES state is green
  • Passwordless SSH works
  • System-volume space is sufficient
  • /opt/sds permissions are 755
  • umask=0022
  • Postgres synchronization is normal
  • Historical alerts are cleared
  • Cluster version is confirmed
  1. Use xms-manage db list to locate the primary database node.
  2. Download and extract the upgrade package on the primary database node.
  3. Run:
   ./upgrade.sh
  1. To skip Ceph status checks:
   ./upgrade.sh --nc
  1. If the upgrade is interrupted:
   ./upgrade.sh --continue
  1. If the Prometheus port conflicts, change Prometheus.exporterPort in zstack.properties and restart MN services.
  • Expected result: Storage upgrades to 5.2.x.
  1. Post-upgrade checks and completion
  2. Check:
   ceph -s
   xms-cli -v
   systemctl status xdc
   systemctl status xmsd
   docker ps

Check UI modules including block storage, file storage, Resource Management, and Monitoring Management.

  1. Re-enable physical hosts and VMs in the Ceph cluster, then enable global HA.
  2. Run the inspection script for environment health.
  • Expected result: The platform, virtualization components, and storage recover health after upgrade.

Verification

  • Management services, Ceph cluster, and storage pools are healthy.
  • Platform resources and service VMs are normal.
  • xms-cli -v, qemu, and libvirt reach target versions.
  • The inspection result contains no critical alerts.

Risks and rollback

  • Risk: Management nodes are unavailable during platform upgrade, and component upgrade has significant compatibility impact.
  • Risk: VMs must migrate or restart after qemu/libvirt upgrade, and the qemu version cannot be rolled back.
  • Risk: Storage upgrades are not normally rolled back; if interrupted, analyze the cause and continue with ./upgrade.sh --continue.
  • Risk level: high.
  • Rollback: A complete dual-management rollback plan is available only for ZStackCube; rolling back storage and qemu is not recommended without careful confirmation.
Offline upgrade plan for a ZCE-X Ceph cluster | 技术方案 · KB | ZStack Resource Center