diff --git a/scripts/install-worker.sh b/scripts/install-worker.sh index 56ae744d1..e9a033b91 100644 --- a/scripts/install-worker.sh +++ b/scripts/install-worker.sh @@ -68,11 +68,14 @@ sudo yum install -y \ socat \ unzip \ wget \ - yum-utils + yum-utils \ + yum-plugin-versionlock # Remove any old kernel versions. `--count=1` here means "only leave 1 kernel version installed" sudo package-cleanup --oldkernels --count=1 -y +sudo yum versionlock kernel-$(uname -r) + # Remove the ec2-net-utils package, if it's installed. This package interferes with the route setup on the instance. if yum list installed | grep ec2-net-utils; then sudo yum remove ec2-net-utils -y -q; fi diff --git a/scripts/upgrade_kernel.sh b/scripts/upgrade_kernel.sh index 37946283a..67e509caa 100755 --- a/scripts/upgrade_kernel.sh +++ b/scripts/upgrade_kernel.sh @@ -24,7 +24,4 @@ sudo grubby \ --update-kernel=ALL \ --args="psi=1" -sudo yum install -y yum-plugin-versionlock -sudo yum versionlock kernel - sudo reboot