Applicable Scenario
- Product:
ZCF - Component:
ZStack Cloud - ZStack Cloud versions: from
4.8.xto5.5.x - Operating system:
h84r - Deployment: dual management nodes
- Trigger condition: upgrade the dual-management-node platform to
5.5.xand updateqemu/libvirtto LTS versions.
Symptoms
- The current platform is
4.8.x, which is not an LTS release. - The platform must be upgraded to
5.5.x. - The upgrade includes the control plane and
qemuandlibvirtcomponents. - Compatibility risks include
experimental repo, residualuserspace-rcu, and missingvirtio-vga.
Diagnostic Procedure
- Run readiness checks and inspect
check.logbefore the upgrade. - After the platform upgrade, reconnect one non-critical host first for grayscale acceptance.
- Before component upgrades, confirm whether any special compatibility scenario applies.
Cause
This is a complete dual-management-node grayscale upgrade. In addition to upgrading qemu/libvirt, it must address historical experimental repo use, package remnants, and missing migration modules. Perform the work in stages and increase scope only after validation.
Resolution
- Preparation
- Risk level: high.
- Apply only to
x86 + h84renvironments. - Disable global high availability.
- Reserve one non-critical host for grayscale reconnection validation.
- Stop all backup tasks.
- Environment preparation
- Run the readiness check:
tar -zxvf zstack-upgrade-check-master.tar.gz
cd zstack-upgrade-check-master && bash exec_tool.sh -p <management_node_admin_password>
cat ./log/check.log
- Expected result: the upgrade environment has no blocking item.
- Adjust database timeouts:
wait_timeout=28800
interactive_timeout=28800
Then run:
systemctl restart mariadb.service
- Expected result: database timeout risk is reduced during the upgrade.
- Update global configuration:
UpdateGlobalConfig category=storageDevice name=enable.multipath value=ignore
UpdateGlobalConfig category=applianceVm name=connect.timeout value=1200
UpdateGlobalConfig name=update.os.parallelismDegree category=cluster value=5 or 10
UpdateGlobalConfig name=update.os.parallelismDegree category=host value=10
- Expected result: upgrade and reconnection parameters are prepared.
- Back up the dual-management-node database:
zstack-ctl dump_mysql --file-name zstack-baskup-master-20260122
zstack-ctl dump_mysql --file-name zstack-backup-slave-20260122
- Expected result: a platform rollback basis is available.
- Grayscale-upgrade the platform to 5.5.x
- Update repositories on both management nodes:
bash zstack-upgrade -r ZStack-Cloud-x86_64-DVD-5.3.42-h84r.iso
- Expected result: upgrade repositories are switched.
- Identify the node holding the VIP:
zsha2 status
- Expected result: the HA-upgrade execution node is identified.
- Extract and authorize the HA package:
tar zxvf ZStack-Multinode-HA-Suite.tar.gz
chmod +x zsha2 zstack-hamon
- Expected result: HA tools are ready.
- Stop MN services on both management nodes:
zsha2 stop-node
- Expected result: nodes enter the upgrade state.
- On the VIP node, run:
./zsha2 upgrade-ha -gencfg=true
- Expected result: the HA suite is upgraded.
- Perform the platform grayscale upgrade:
zsha2 upgrade-mn -grayscale -yes -db-root-pw <database_root_password> -peerpass <peer_database_root_password> ZStack-Cloud-installer-5.5.0.bin
- Expected result: the platform is upgraded to
5.5.x.
- Check after the upgrade:
zstack-ctl status
zsha2 status
- Expected result: management services and HA are normal.
- Grayscale acceptance
- Log in to the UI and verify that hosts, primary storage, image servers, and other resources are connected.
- Expected result: control-plane resources are normal.
- Manually reconnect one non-critical host first.
- Expected result: the host upgrade status becomes
Upgraded.
- Check:
zstack-cli QueryAgentVersion
- Expected result: the Agent version is recorded correctly.
- Check by storage type:
- SharedBlock:
vgs,lsblk,multipath -ll, and I/O error logs - Ceph:
ceph -s - Local storage:
xfsand device and path logs - VMs: check network connectivity with console
ping - Expected result: workloads and storage are normal.
- Reconnect the other hosts in sequence if no issue is found.
- Disable the grayscale switch after the global upgrade:
QueryGlobalConfig category=upgradeControl name=grayscaleUpgrade
UpdateGlobalConfig name=grayscaleUpgrade category=upgradeControl value=false
- Enable global high availability.
- Expected result: the platform-upgrade phase is complete.
- Upgrade qemu / libvirt in stages
- Log in to
zstack-cliand enable the grayscale variable first:
QueryGlobalConfig category=upgradeControl name=grayscaleUpgrade
UpdateGlobalConfig name=grayscaleUpgrade category=upgradeControl value=true
- Expected result: the component grayscale-upgrade switch is enabled.
- Upgrade one host first:
qemu-storage-daemonqemu-kvmlibvirtglib2- Expected result: validation completes on one host first.
- Disable the grayscale variable after validation succeeds and upgrade the cluster.
- Expected result: the batch component upgrade starts.
- Use:
QueryLongJob uuid=<job_uuid>
Monitor upgrade progress.
- Check versions in batches:
- Use batch SSH to run
rpm -q qemu-kvm libvirt glib2. - Expected result: host versions are consistent.
- After the
qemuupgrade, migrate or restart VMs, then run:
virsh qemu-monitor-command $VMuuid --hmp info version
Check the actual version.
- Expected result: VMs use the new QEMU version.
- Special compatibility items
- If the environment was upgraded through the
experimentalrepository, enable it again:
UpdateGlobalConfig name="zstack.experimental.repo" value=true category=cluster
- If the environment uses
ZCE-X 5.2.x, verify thatuserspace-rcuanduserspace-rcu-develare fully removed. - If cross-cluster migration on ARM reports missing
virtio-vga, manually installqemu-system-x86_64on the new cluster and restartlibvirtd.
Verification
- Verify that the platform version is
5.5.x. - Verify that the first grayscale host and subsequently reconnected hosts are normal.
- Verify that
QueryAgentVersionis correct. - Verify that
qemu/libvirt/glib2match the target versions. - Verify that no special compatibility conflict occurs.
Risks and Rollback
- Risk: management nodes are unavailable during the upgrade; resources and third-party APIs cannot be used.
- Risk: component upgrades involve multiple compatibility conditions; failure to identify them can affect migration, host addition, or dependencies.
- Risk level: high.
- Rollback: return dual management to single management, restore the previous repository and installer, and execute the complete
restore_mysqlrollback path.
