Files
floci/docs/services
Priamo Germosen c1a8a3b3ac feat(emr): serve a cluster's nodes their instance metadata (#8449)
Every node of an EMR cluster is an EC2 instance, so any process on it,
a bootstrap action, a step or a Spark executor, reads its instance
metadata at 169.254.169.254. In the docker runner mode nothing answered
there: a bootstrap script reading its availability zone got nothing.

A relay container on the cluster's own Docker network now holds that
address as a link-local one, as ECS's credentials endpoint is held, and
each of the cluster's containers gets a link-local address of its own
there, so none needs privileges. The relay forwards to Floci's EC2
metadata server, naming its caller in X-Forwarded-For, which the server
reads only from the relays it trusts; the server answers each container
as the instance it is: the bootstrap actions and each step as the
primary node, each core or task node's container as that node, with the
instance id, type, private address and name ListInstances gives, the
cluster's availability zone and its JobFlowRole instance profile. The
metadata server now starts for the docker runner mode too.

DescribeCluster's Ec2InstanceAttributes now gives Ec2AvailabilityZone,
the one RunJobFlow's Instances.Placement names, else the Region's first,
so the metadata and the cluster agree.
2026-11-15 09:59:49 -04:00
..
2026-08-21 00:09:04 -04:00