[openstack-dev] [ironic] network_interface, defaults, and explicitness

Sam Betts (sambetts) sambetts at cisco.com
Mon Aug 1 12:20:55 UTC 2016


On 01/08/2016 13:10, "Jim Rollenhagen" <jim at jimrollenhagen.com> wrote:

>Hey all,
>
>Our nova patch for networking[0] got stuck for a bit, because Nova needs
>to know which network interface is in use for the node, in order to
>properly set up the port.
>
>The code landed for network_interface follows the following order for
>what is actually used for the node:
>1) node.network_interface, if that is None:
>2) CONF.default_network_interface, if that isNone:
>3) flat, if using neutron DHCP
>4) noop, if not using neutron DHCP
>
>The API will return None for node.network_interface in the API (GET
>/v1/nodes/uuid). This won't work for Nova, because Nova can't know what
>CONF.default_network_interface is.
>
>I propose that if a network_interface is not sent in the node-create
>call, we write whatever the current default is, so that it is always set
>and not using an implicit value that could change.

+1 from me

>
>For nodes that exist before the upgrade, we do a database migration to
>set network_interface to CONF.default_network_interface (or if that's
>None, set to flat/noop depending on the DHCP provider).
>
>An alternative is to keep the existing behavior, but have the API return
>whatever interface is actually being used. This keeps the implicit
>behavior (which I don't think is good), and also doesn't provide a way
>to find out from the API if the interface is actually set, or if it's
>using the configurable default.
>
>I'm going to go ahead and execute on that plan now, do speak up if you
>have major objections to it.
>
>// jim
>
>[0] https://review.openstack.org/#/c/297895/
>
>__________________________________________________________________________
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list