From 97dcb98c8ea3321358e869b85dabe7414ec17a6a Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 24 Nov 2023 13:48:24 -0500 Subject: [PATCH] Miscellaneous fixes from AL2023 testing (#1528) Signed-off-by: Davanum Srinivas --- files/bootstrap.sh | 2 +- scripts/install-worker.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/files/bootstrap.sh b/files/bootstrap.sh index 36f47d9c3..f7327868d 100755 --- a/files/bootstrap.sh +++ b/files/bootstrap.sh @@ -407,7 +407,7 @@ fi log "INFO: Using IP family: ${IP_FAMILY}" -echo $B64_CLUSTER_CA | base64 -d > $CA_CERTIFICATE_FILE_PATH +echo "$B64_CLUSTER_CA" | base64 -d > $CA_CERTIFICATE_FILE_PATH sed -i s,MASTER_ENDPOINT,$APISERVER_ENDPOINT,g /var/lib/kubelet/kubeconfig sed -i s,AWS_REGION,$AWS_DEFAULT_REGION,g /var/lib/kubelet/kubeconfig diff --git a/scripts/install-worker.sh b/scripts/install-worker.sh index 05c1b3f05..b2a01b7d1 100644 --- a/scripts/install-worker.sh +++ b/scripts/install-worker.sh @@ -88,13 +88,19 @@ fi if cat /etc/*release | grep "al2023" > /dev/null 2>&1; then # exists in al2023 only (needed by kubelet) sudo yum install -y iptables-legacy + + # Remove the amazon-ec2-net-utils package, if it's installed. This package interferes with the route setup on the instance. + if yum list installed | grep amazon-ec2-net-utils; then sudo yum remove amazon-ec2-net-utils -y -q; fi + + # Temporary fix for https://github.com/aws/amazon-vpc-cni-k8s/pull/2118 + sed -i "s/^MACAddressPolicy=.*/MACAddressPolicy=none/" /usr/lib/systemd/network/99-default.link else # curl-minimal already exists in al2023 so install curl only on al2 sudo yum install -y curl -fi -# 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 + # 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 +fi sudo mkdir -p /etc/eks/