scylladb / seastar

High performance server-side application framework
http://seastar.io
Apache License 2.0
8.36k stars 1.55k forks source link

perftune.py should switch to AWS IMDSv2 calls #1051

Open fee-mendes opened 2 years ago

fee-mendes commented 2 years ago

perftune's __check_host_type method uses IMDSv1 for retrieving instance metadata. It turns out that - as described in https://github.com/scylladb/scylla/issues/10490 - Ec2 instances may have only IMDSv2 HTTP calls allowed.

When requests to IMDSv1 fail, calling is_aws_i3_non_metal_instance() will evaluate to False, which means that i3.nonmetal instance types will get tuned as if they weren't i3 instances.

tomer-sandler commented 1 year ago

https://github.com/scylladb/scylladb/issues/10490 is fixed (closed) and is part of OSS 5.2 release notes. What's the ETA to get this fixed as well?

mykaul commented 1 year ago

Doesn't seem to have been prioritized so far. There's code we can use @ https://github.com/scylladb/scylla-machine-image/blob/next/lib/scylla_cloud.py#L640

mykaul commented 10 months ago

BTW, this will also break on IPv6 only environments. There you need to use fd00:ec2::254