How do I upgrade the kernel to version 4.18.0 and GCC to version 8.x when using A-series GPUs on the platform?
Solution
-
Log in to the platform, go to Reliable Services > Business Reliability > HA Policy, and disable the HA Policy on the HA Policy details page. Log in to the console of each Management Node and run the following commands to back up the database and upgrade scripts:
#Back up primary MN database zstack-ctl dump_mysql --file-namezstack-db-backup-master-20230309 #Back up standby MN database zstack-ctl dump_mysql --file-namezstack-db-backup-slave-20230309 cp /usr/local/bin/zstack-upgrade/root/zstack-upgrade-bk -
Run the following command to upgrade the kernel. In this scenario, the UUID is the Cluster UUID:
[root@localhost~] zstack-cli - >> LogInByAccount accountName=admin password=password - >> UpdateGlobalConfig name="zstack.experimental.repo" value=true category=cluster - >> UpdateClusterOS excludePackages=python2-crypto updatePackages=kernel uuid=28b4539b024341ac91af401e0aec46c5 -
Verify whether the kernel upgrade succeeded using one of the following methods:
-
Run
cat /boot/grub2/grubenvand check whether the grubenv file contains the following parameter. If it does, the upgrade succeeded:saved_entry=Helix Linux(4.18.0-240.22.1.1.gd6dbaa7.el7.x86_64) 7 (Core) -
Run
cat /boot/grub2/grub.cfgand check whether the grub.cfg file contains the following parameter. If it does, the upgrade succeeded:menuentry 'Helix Linux(4.18.0-240.22.1.1.gd6dbaa7.el7.x86_64) 7 (Core)'
-
-
Run
vim /boot/grub2/grubenv, add the following content to the grubenv file, and restart the host:saved_entry=Helix Linux(4.18.0-240.22.1.1.gd6dbaa7.el7.x86_64) 7 (Core) -
Run
gcc -v cat /proc/versionto check the GCC version. -
Run the following commands to install centos-release-scl:
wget -O /etc/yum.repos.d/CentOS-Base.repo [https://mirrors.aliyun.com/repo/Centos-7.repo](https://mirrors.aliyun.com/repo/Centos-7.repo) yum makecache fast yum -y install centos-release-scl -
Run
sudo yum install devtoolset-8-gcc*to install devtoolset. -
Run
scl enable devtoolset-8 bashto switch the GCC version. -
Log in to the platform, go to Reliable Services > Business Reliability > HA Policy, and enable the HA Policy on the HA Policy details page.