-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AWS command error when building AMI #1106
Comments
Does the addition of https://github.com/awslabs/amazon-eks-ami/blob/master/scripts/install-worker.sh#L138 |
No that didn't work. Still got the same error.
|
Hm, I can't reproduce this. You might want to
And what version of Packer are you using? |
We use Jenkins to create our images. Our Jenkins image has packer version When I run this locally on my mac, my packer version is As for the packer command, that's all the variables we're setting. This was working just last week with
|
That's the |
That's the path on the packer builder instance when I add it to the install-worker.sh file. |
Interesting. Can you confirm the user on the packer instance? (throw You could also try changing the |
When I add As for changing
|
I have the same error with AMIs
Running a script
|
@wyattkwan I meant change the value of the
This error looks like you removed the flag:
|
@carlosjgp can you check if this change resolves things for you? |
@cartermckinnon sorry about that. Here is the output once i updated the
|
If your Can you add the commit SHA or tag that your checkout is based on so others can try to reproduce? Unless we have a reliable reproduction, I'm not sure what else we can do to root-cause this. |
I'm building on top of the released AMI. I would need a new release including the PR to be able to test this for now I'll install I'll post an update after building on the next AMI |
We are experiencing the same issues, is there an ETA on when a new released AMI might get cut with this fix? |
We've cut #1102 in the last two releases (v20220305 and v20221222). We still don't have a reliable repro, so if you can add details @nwesoccer, it could help us get to the bottom of this. |
I applied the following patch "install-worker.sh.patch" to get the aws command not found issue fixed in the pipeline, it looks like there is permission issue for ec2-user to access /usr/local/aws-cli patch scripts/install-worker.sh < install-worker.sh.patch
|
Thanks for the patch @longc Needed to apply that to get around the aws command not found error. |
What happened:
When building new AMI with v20221112 the build would fail when downloading binaries from s3://amazon-eks.
Line 251 is:
aws s3 cp --region $BINARY_BUCKET_REGION $S3_PATH/$binary
Fix is to re-add awscli back to the scripts/install-worker.sh.
794ed5f#diff-dff0aa3a99c138c812c9364e64a6f95abec4590a27f0fb2b448231342b4a3b89L65
What you expected to happen:
Binaries to be downloaded.
How to reproduce it (as minimally and precisely as possible):
packer build -timestamp-ui -color=false --var aws_region='us-east-1' --var ami_name='amazon-eks-node-1.21-20221121135924' --var binary_bucket_region='us-east-1' --var kubernetes_version='1.21.14' --var kubernetes_build_date='2022-10-31' --var arch='x86_64' --var instance_type='m4.large' eks-worker-al2.json
Anything else we need to know?:
Even though awscli v2 bundle was installed, it couldn't run line 251 when it got to it.
794ed5f#diff-dff0aa3a99c138c812c9364e64a6f95abec4590a27f0fb2b448231342b4a3b89R120-R140
Environment:
aws eks describe-cluster --name <name> --query cluster.platformVersion
): eks.11aws eks describe-cluster --name <name> --query cluster.version
): 1.21uname -a
): Darwin A-W13QNVG40 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 arm64cat /etc/eks/release
on a node):The text was updated successfully, but these errors were encountered: