Symptoms
Sometimes it might be needed to update the infrastructure up to some particular version/build of the VHS 7 (e.g., for the sake of compatibility with 3rd party systems).
But the procedure can't be completed by simply issuing the "yum update" command, as in that case the latest update will be installed by default.
This article describes the sequence of actions that you need to take to get the node updated to the specific version/build.
Resolution
Before updating the nodes, update management containers va-mn and vstorage-ui with this command:
# yum update -y
This step is required to ensure the proper operation of both management panels. The command should be run from inside the management containers.
After that Virtuozzo Hybrid Server 7 installation can be updated to the custom update version (not the latest) with the following steps:
1. Check for the nodes' current update level for each node, and reboot the nodes which were not rebooted after the previous update procedure.
2. Change the Virtuozzo repositories for the node that will be updated
Note: disable all custom repositories in this step
- Only virtuozzo and vzlinux repositories should be enabled
- Change the repository source from mirrorlist to baseurl pointing to the required update version from http://repo.virtuozzo.com/vz/releases/ (In this example, 7.0.14-257 will be used)
virtuozzo-os http://repo.virtuozzo.com/vz/releases/7.0.14-257/x86_64/os/ virtuozzo-updates http://repo.virtuozzo.com/vz/updates/7.0.14-258/x86_64/os/
- Edit /etc/yum.repos.d/virtuozzo.repo
How it should look after editing:
[virtuozzo-os] name=Virtuozzo
#mirrorlist=http://repo.virtuozzo.com/vz/mirrorlists/7.0/releases-os.mirrorlist baseurl=http://repo.virtuozzo.com/vz/releases/7.0.14-257/x86_64/os/ enabled=1 gpgcheck=1 priority=50 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7 [virtuozzo-updates] name=Virtuozzo Updates
#mirrorlist=http://repo.virtuozzo.com/vz/mirrorlists/7.0/updates-os.mirrorlist baseurl=http://repo.virtuozzo.com/vz/updates/7.0.14-258/x86_64/os/ enabled=1 gpgcheck=1 priority=50 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7
3. Clear yum cache
# yum clean all # rm -rf /var/cache/yum/*
4. Get the repositories list to ensure no errors are reported, and the repositories are accessible:
# yum repolist
5. For Virtuozzo Storage Cluster node(s), disable and mask shaman service (if the High Availability is enabled in your cluster), to prevent unexpected reboots during updates installation:
# systemctl stop shaman # systemctl disable shaman # systemctl mask shaman
6. Check for updates:
# yum check-update
7. Backup the /etc/fstab file:
# cp /etc/fstab /root/fstab.bak
8. Start the update in the screen session, it will help to prevent inconsistent updates in case your ssh connection breaks during the update.
# screen -S Node-Update # yum update
wait until the update is finished.
9. Check the initramfs for the new kernel in the /boot directory. If it is not present, reinstall the kernel with this command:
# yum reinstall vz-kernel
10. Check /etc/fstab file content. If it is present — continue with the next step; if not — restore it from the backup made in step 7.
11. Reboot the node and check the node's health (Virtuozzo Storage mount point access first).
12. Unmask, enable, and start shaman service (if High Availability is enabled in your cluster) and check the status with this command:
# shaman stat
13. Double-check the node network and other services' health. After completing all checks, perform the update for the next node using steps 1–13.
NOTE: Only perform the update sequentially for the nodes in the cluster, do not update two or more nodes simultaneously. Vstorage services will restart during the update, and it can cause cluster performance degradation and instability.