Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region fix went missing on amazon-eks-node-1.29-v20240202 #1747

Closed
marquesj2-ppb opened this issue Apr 4, 2024 · 1 comment
Closed

Region fix went missing on amazon-eks-node-1.29-v20240202 #1747

marquesj2-ppb opened this issue Apr 4, 2024 · 1 comment

Comments

@marquesj2-ppb
Copy link

marquesj2-ppb commented Apr 4, 2024

What happened:

Can't join the node when using the latest AMI update, the #1626 fix is not present on latest image.

How to reproduce it (as minimally and precisely as possible):
Created an EC2 instance using amazon-eks-node-1.29-v20240202 ami-047f9786aebf774c8

[ec2-user@ip-10-xxx-xxx-xxx ~]$ cat /etc/eks/containerd/pull-sandbox-image.sh
#!/usr/bin/env bash
set -euo pipefail

source <(grep "sandbox_image" /etc/containerd/config.toml | tr -d ' ')

### Short-circuit fetching sandbox image if its already present
if [[ "$(sudo ctr --namespace k8s.io image ls | grep $sandbox_image)" != "" ]]; then
  exit 0
fi

MAX_RETRIES=3

function retry() {
  local rc=0
  for attempt in $(seq 0 $MAX_RETRIES); do
    rc=0
    [[ $attempt -gt 0 ]] && echo "Attempt $attempt of $MAX_RETRIES" 1>&2
    "$@"
    rc=$?
    [[ $rc -eq 0 ]] && break
    [[ $attempt -eq $MAX_RETRIES ]] && exit $rc
    local jitter=$((1 + RANDOM % 10))
    local sleep_sec="$(($((5 << $((1 + $attempt)))) + $jitter))"
    sleep $sleep_sec
  done
}

ecr_password=$(retry aws ecr get-login-password)
if [[ -z ${ecr_password} ]]; then
  echo >&2 "Unable to retrieve the ECR password."
  exit 1
fi
retry sudo crictl pull --creds "AWS:${ecr_password}" "${sandbox_image}"
@cartermckinnon
Copy link
Member

20240202 isn’t the latest release; this PR was first present in: https://github.com/awslabs/amazon-eks-ami/releases/tag/v20240209

@cartermckinnon cartermckinnon closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants