-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Bulk patch aws/aws-sdk-go-v2 dependencies #1395
Conversation
could you share more about the failing authentication issue ? would be great if the CI tests would catch this, as it uses real S3 for testing... |
@neolynx I saw the same issue and it was specific to EC2 IMDS (perhaps isolated to IMDSv2) combined with publish to S3. Maybe your CI tests publish to S3 but aren't using EC2 IMDS to obtain the access keys? The error is reproducible on an EC2 instance (or a container image running on an EC2 instance) with IMDSv2 enabled, and no specific IAM policies required. The error happens before IAM policy policy evaluation. The issue is explained very well here: aws/aws-sdk-go-v2#2370 (comment) Steps To ReproduceUsing a container is recommended, but not required. docker run --rm -ti ubuntu:22.04 The issue can be reproduced consistently. # Prepare to install Aptly
apt-get update && apt-get -y install wget jq
wget -O /etc/apt/keyrings/aptly.asc https://www.aptly.info/pubkey.txt
cat <(echo "deb [signed-by=/etc/apt/keyrings/aptly.asc] http://repo.aptly.info/ci jammy main") > /etc/apt/sources.list.d/aptlyci.list
# actually install Aptly
apt-get update && apt-get -y install aptly
# create a repo and the default aptly.conf
aptly repo create test
# add S3PublishEndpoints to aptly.conf
cp ~/.aptly.conf ~/.aptly.conf.orig
jq '.S3PublishEndpoints={"test":{"region":"us-east-1","bucket":"dontcare"}}' ~/.aptly.conf.orig > ~/.aptly.conf
# attempt to publish repo
aptly publish repo -architectures=amd64 -distribution=test -skip-signing test s3:test: The following error is observed Warning: publishing from empty source, architectures list should be complete, it can't be changed after publishing (use -architectures flag)
Loading packages...
Generating metadata files and linking package files...
Finalizing metadata files...
ERROR: unable to publish: unable to publish file: error uploading /tmp/aptly1351411402/main_binary-amd64_Packages to S3: us-east-1:dontcare/: operation error S3: PutObject, get identity: get credentials: failed to refresh cached credentials, no EC2 IMDS role found, not found, Signing I would highlight this part of the error message in particular:
Despite the error message, EC2 IMDS is indeed available. root@eb7e71c33e06:/# apt-get -y install cloud-utils
root@eb7e71c33e06:/# ec2metadata --instance-type
c6a.2xlarge Version under testroot@eb7e71c33e06:/# aptly version
aptly version: 1.6.0~rc1+20241117171302.763b810c
root@eb7e71c33e06:/# apt-cache policy aptly
aptly:
Installed: 1.6.0~rc1+20241117171302.763b810c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for explaining !
the aptly test are not using EC2 IMDS, and I think it would be too complicated to setup, as it is a upstream bug...
Fixes #
Requirements
All new code should be covered with tests, documentation should be updated. CI should pass.
Description of the Change
Updates the
github.com/aws/aws-sdk-go-v2/...
dependencies due to a failing authentication issue when trying the most recent builds.Checklist
unit-test added (if change is algorithm)functional test added/updated (if change is functional)man page updated (if applicable)bash completion updated (if applicable)documentation updatedAUTHORS