[openstack-dev] [Neutron] cloud-init IPv6 support

Joshua Harlow harlowja at yahoo-inc.com
Mon Jul 7 19:10:21 UTC 2014


Just a update; since I'm the one who recently did a lot of the openstack adjustments in cloud-init.

So this one line is part of the ipv4 requirement:

http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/sources/DataSourceOpenStack.py#L30

It though can be overriden either by user-data or by static-configuration data that resides inside the image.

This is the line of code that does this:

http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/sources/DataSourceOpenStack.py#L77

This means that the image builder can set cloud-init config list 'metadata_urls' to be a ipv6 format (if they want).

The underlying requests library (as long as it supports ipv6) should be happy using this (hopefully there aren't any other bugs that hinder its usage).

Btw, for the curios, that datasource inherits from the same base class as http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/sources/DataSourceConfigDrive.py (a mixin is used) so the config drive code and the openstack metadata reading code actually use the same base code (which was a change that I did that I thought was neat)  and only change how they read the data (either from urls or from a filesystem).

From: <CARVER>, PAUL <pc2929 at att.com<mailto:pc2929 at att.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Monday, July 7, 2014 at 11:26 AM
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] [Neutron] cloud-init IPv6 support


Andrew Mann wrote:
>What's the use case for an IPv6 endpoint? This service is just for instance metadata,
>so as long as a requirement to support IPv4 is in place, using solely an IPv4 endpoint
>avoids a number of complexities:

The obvious use case would be deprecation of IPv4, but the question is when. Should I
expect to be able to run a VM without IPv4 in 2014 or is IPv4 mandatory for all VMs?
What about the year 2020 or 2050 or 2100? Do we ever reach a point where we can turn
off IPv4 or will we need IPv4 for eternity?

Right now it seems that we need IPv4 because cloud-init itself doesn’t appear to support
IPv6 as a datasource. I’m going by this documentation
http://cloudinit.readthedocs.org/en/latest/topics/datasources.html#what-is-a-datasource
where the “magic ip” of 169.254.169.254 is referenced as well as some non-IP mechanisms.

It wouldn’t be sufficient for OpenStack to support an IPv6 metadata address as long as
most tenants are likely to be using a version of cloud-init that doesn’t know about IPv6
so step one would be to find out whether the maintainer of cloud-init is open to the
idea of IPv4-less clouds.

If so, then picking a link local IPv6 address seems like the obvious thing to do and the
update to Neutron should be pretty trivial. There are a few references to that
“magic ip”
https://github.com/openstack/neutron/search?p=2&q=169.254.169.254&ref=cmdform
but the main one is the iptables redirect rule in the L3 agent:
https://github.com/openstack/neutron/blob/master/neutron/agent/l3_agent.py#L684


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140707/0cdc5241/attachment.html>


More information about the OpenStack-dev mailing list