Applicable Scenario
- Product:
ZCF - Component:
ZStack Cloud - Versions:
4.8.x,5.4.x, and4.18.x - Current versions:
Cloud 4.8.xLibvirt 8.0.xQemu 6.2.xKernel 4.18.0-425...- Target versions:
Cloud 5.4.xqemu-kvm-6.2.xlibvirt-8.0.xKernel 4.18.0-553.69.1.13...- Deployment: dual management nodes and SAN storage
Symptoms
- The current platform and virtualization-component versions are outdated.
- The platform, qemu/libvirt, and host kernel versions need to be upgraded.
- More useful diagnostic logs are also required when a host crashes.
Diagnostic Procedure
- Before the upgrade, use the upgrade-check script to verify environment health.
- After the upgrade, verify that the platform, Agent, virtualization-component, and kernel versions match the target values.
- Verify that workloads and VM networking operate normally.
Cause
This is a combined upgrade involving the platform, host crash parameters, and host kernels. Perform the work in stages and validate each host before proceeding.
Resolution
- Configure host crash parameters.
- Use
config_crashdump.shto configure crashdump.
- Purpose: produce more useful logs when a host crashes.
- Prerequisite: restart the host for the configuration to take effect.
- Verify the configuration:
systemctl status kdump
dmesg | grep -i crash
- High-risk test:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
- After restart, check:
ls -l /var/crash/
- Expected result: kdump and crash-retention settings are correctly configured.
- Upgrade ZStack Cloud to 5.4.x.
- Run
zstack-upgrade-check-masterto perform upgrade readiness checks.
- Expected result: the environment is healthy and upgrade risks are identified.
- Disable global high availability.
- Reserve one non-critical host for early reconnection verification.
- On both management nodes, upload the ISO, upgrade script, HA package, and bin file, and verify the MD5 and commit values.
- Adjust global CLI configuration:
enable.multipath=ignore
connect.timeout=1200
update.os.parallelismDegree cluster=5/10
update.os.parallelismDegree host=10
- Stop all ZStack Cloud backup tasks.
- Back up the database on both management nodes:
zstack-ctl dump_mysql --file-name 4.x-mn1
zstack-ctl dump_mysql --file-name 4.x-mn2
- Update the repositories on both management nodes.
- Identify the VIP node, extract and authorize the HA package, and stop the MN service.
- On the VIP node, run:
./zsha2 upgrade-ha -gencfg=true
zsha2 upgrade-mn -grayscale -yes -db-root-pw $mysql_root_password -peerpass $peer_root_password $zstack_bin
- After the upgrade, check:
zstack-ctl status
zsha2 status
- Log in to the UI and verify resource status.
- Manually reconnect one non-critical host first, then verify
kvmagent, VM operation, and workloads. - Check the Agent version:
zstack-cli QueryAgentVersion
- In SharedBlock or SAN environments, also check:
vgslsblkmultipathI/O errorin/var/log/messagesdmesg
- If no issue is found, reconnect the remaining hosts in sequence.
- After the global upgrade is complete, disable the grayscale variable:
UpdateGlobalConfig name=grayscaleUpgrade category=upgradeControl value=false
- Enable global high availability.
- Expected result: the platform upgrade is complete and workloads remain stable.
- Upgrade virtualization components.
- Upgrade the following components on a single host or cluster:
qemu-storage-daemonqemu-kvmglib2libvirt
- Use
QueryLongJobto check upgrade progress. - Use SSH to check versions in batches.
- Run:
virsh qemu-monitor-command $VMuuid --hmp info version
Verify the actual qemu version used by the VM.
- After qemu is upgraded, restart or migrate the VM before the new version takes effect.
- Expected result: the virtualization-component upgrade takes effect.
- Upgrade host kernels to 553.
- Log in to ZStack Cloud and verify that the environment is healthy.
- Disable global high availability and back up the database on both management nodes.
- Verify that all VMs have been migrated away from the host to be upgraded:
virsh list
- Put the host into maintenance mode.
- Extract the kernel-upgrade package:
tar -xvzf upgrade_kernel_bcache.tar.gz
- Run the upgrade:
cd upgrade_kernel_bcache/
bash upgrade_kernel.sh <host_ip>
- Restart the host after the upgrade so that the new kernel takes effect.
- Kernel package MD5:
b327d608fd85d5afd27d906b09fb89ca
- Verify the kernel version after the restart.
- After verification succeeds, upgrade the remaining nodes in sequence.
- After ZStack Cloud operates normally, re-enable global high availability.
- Expected result: all target hosts have been upgraded to kernel 553.
Verification
- Verify that the platform, Agent, qemu/libvirt/glib2, and kernel versions match the target values.
- Verify that SAN and SharedBlock status is normal.
- Verify that VM networking and workloads operate normally.
Risks and Rollback
- Risk: host kernel upgrades require restarts and can affect compatibility and workload continuity. Isolate each host before the upgrade.
- Risk: if VMs are not restarted or migrated after the qemu upgrade, they continue to run with the previous qemu version.
- Risk level: medium.
- Rollback: no complete rollback procedure is available. Reduce risk through staged execution and validation.
