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

Support for EKS Pod Identity #618

Open
waldher opened this issue Nov 19, 2024 · 3 comments · May be fixed by #622
Open

Support for EKS Pod Identity #618

waldher opened this issue Nov 19, 2024 · 3 comments · May be fixed by #622

Comments

@waldher
Copy link

waldher commented Nov 19, 2024

When trying to use the EKS Pod Identity feature from AWS, we see the following error:

2024/11/19 08:06:14 Ignoring, HTTP credential provider invalid endpoint host, "169.254.170.23", only loopback hosts are allowed. <nil>
2024/11/19 08:06:14 ERROR failed to run error="cannot fetch generations: cannot lookup bucket region: NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors"

This is due to the fact that according to AWS documentation, this is only supported as of the aws-go-sdk v1.47.11. However, Litestream v0.3.13 uses v1.44.318. Thankfully, this was already patched in the main branch in #475, so all we would need to do is release a new version. No code changes are necessary.

Could we tag a new version off of the main branch, and push a new docker image to https://hub.docker.com/r/litestream/litestream ?

@sylr sylr linked a pull request Dec 15, 2024 that will close this issue
@sylr
Copy link

sylr commented Dec 15, 2024

@waldher would you be keen to you try ghcr.io/sylr/litestream:v0.3.13-32-ga91dbd7 which builds sylr@a91dbd7 which uses aws-sdk-go-v2.

I have it working but I'm not using EKS Pod Identity but IRSA.

Warning

There is a PR open but the test suite has not been ran yet (See: #622). Use it at your own risks.

@waldher
Copy link
Author

waldher commented Dec 24, 2024

@sylr Thanks for providing a test image. Unfortunately, it didn't work as simply as I had hoped, as I got the following error:

2024/12/24 14:41:29 INFO restoring snapshot replica=s3 generation=048f03638203d35c index=1 path=/opt/app/data/data.db.tmp
panic: errors: target must be a non-nil pointer

goroutine 1 [running]:
errors.As({0x1560260?, 0x40004243c0?}, {0x1261e00?, 0x0?})
	/usr/local/go/src/errors/wrap.go:108 +0x1d4
github.com/benbjohnson/litestream/s3.isNotExists(...)
	/src/litestream/s3/replica_client.go:770
github.com/benbjohnson/litestream/s3.(*ReplicaClient).SnapshotReader(0x400038e800, {0x15713d0, 0x1e5f1a0}, {0x400041c314, 0x10}, 0x1)
	/src/litestream/s3/replica_client.go:291 +0x1c8
github.com/benbjohnson/litestream.(*Replica).restoreSnapshot(0x40002c60f0, {0x15713d0, 0x1e5f1a0}, {0x400041c314, 0x10}, 0x1, {0x4000045140, 0x19})
	/src/litestream/replica.go:1355 +0x114
github.com/benbjohnson/litestream.(*Replica).Restore(0x40002c60f0, {0x15713d0, 0x1e5f1a0}, {{0xffffe0b236ab, 0x15}, {0x0, 0x0}, {0x400041c314, 0x10}, 0x7fffffff, ...})
	/src/litestream/replica.go:1117 +0x83c
main.(*RestoreCommand).Run(0x1e5f1a0, {0x15713d0, 0x1e5f1a0}, {0x40001001a0, 0x4, 0x4})
	/src/litestream/cmd/litestream/restore.go:83 +0x6f8
main.(*Main).Run(0x40000021c0?, {0x15713d0, 0x1e5f1a0}, {0x4000100190, 0x5, 0x5})
	/src/litestream/cmd/litestream/main.go:120 +0x120
main.main()
	/src/litestream/cmd/litestream/main.go:40 +0x70

@sylr
Copy link

sylr commented Dec 24, 2024

Ok, I found the problem, could you try ghcr.io/sylr/litestream:v0.3.13-32-ga4217ec@sha256 (build of sylr@a4217ec)?

EDIT: I found another issue that should be fixed in ghcr.io/sylr/litestream:v0.3.13-32-ge7b7cdb

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

Successfully merging a pull request may close this issue.

2 participants