We had some discussion on this bug today in #cloud-init. https://irclogs.ubuntu.com/2017/07/10/%23cloud-init.html
It seems that in order to interact with the metadata service, we need to configure the instances ip address as a dhcp request would give us. The service will drop packets if the source address is not "right", and right does not include ipv4 link local scope. So there is really no way to talk to the metadata service unless you do a dhcp. This little script run in a Ubuntu 16.04 image shows what we were trying to do and shows a way that it seems to work: http://paste.ubuntu.com/25062706/ results of: addr: http://paste.ubuntu.com/25062713/ link-local: http://paste.ubuntu.com/25062728/ So that gives us 2 basic options a.) use dhclient (or appropriate distro-provided dhcp client) This probably can be made to work, but we ultimately would have to work with different clients on different distros or image configurations and also have to deal with "side affects" of having done dhclient. Ie, dhclient calls hook scripts on up and down. That may not be a problem, but it definitely could be. b.) use a "built in" dhcp client. http://code.activestate.com/recipes/577649-dhcp-query/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1639030 Title: Configure networking based on EC2 metadata source To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1639030/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
