route metric on multihomed ec2 instances is based on mac address instead of device-number
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Dan Watkins |
Bug Description
Since #114 all network interfaces get IPs and a default route, with a metric based on `nic_idx`. `nic_idx` isn't derived from the EC2 device-number, but from sorting by MAC address:
A machine with multiple interfaces, where the MAC addresses aren't in order, will end up with the wrong metric. For example, if eth0 has a MAC address that sorts before eth1, the default route for eth1 will be given metric 100, while eth0 will get 200.
This wasn't picked up in tests (e.g. https:/
This should say "if eth0 has a MAC address that sorts *after* eth1, the default route for eth1 will be given metric 100, while eth0 will get 200"