Skip to content

Commit

Permalink
Version lock kernel after removing old kernels (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon authored Feb 17, 2023
1 parent 8b10a76 commit 2b75446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion scripts/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions scripts/upgrade_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2b75446

Please sign in to comment.