Merge lp:~raharper/cloud-init/trunk.network-data-bridge into lp:~cloud-init-dev/cloud-init/trunk

Proposed by Ryan Harper on 2016-05-24
Status: Rejected
Rejected by: Scott Moser on 2017-06-06
Proposed branch: lp:~raharper/cloud-init/trunk.network-data-bridge
Merge into: lp:~cloud-init-dev/cloud-init/trunk
Diff against target: 19 lines (+9/-0)
1 file modified
cloudinit/sources/DataSourceConfigDrive.py (+9/-0)
To merge this branch: bzr merge lp:~raharper/cloud-init/trunk.network-data-bridge
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve on 2016-07-20
Scott Moser 2016-05-24 Approve on 2016-05-24
Review via email: mp+295591@code.launchpad.net

Description of the Change

ConfigDrive: Add support for "bridge" link types

Openstack Mikata LinuxBridge mode emits links with type: bridge
which need conversion into network config bridge. This patch
creates the require keys and copies in any keys from network_data.json
that start with 'bridge'. It's unclear whether the OpenStack
LinuxBridge mode provides the ability to attach interfaces to the
bridge so we do not attempt to populate the key 'bridge_interfaces' with
a specific value at this time.

To post a comment you must log in.
Ryan Harper (raharper) wrote :

Use the network_data.json from here:

https://gist.github.com/dmsimard/d6eaa8b61f3c601d833b29ef430637da

This fails since the network_data -> network_config converter did not
handle link type bridge. I've not been able to find out if LinuxBridge
in OpenStack would ever include metadata that indicated if the bridge
would use additional links as ports on the bridge, so for now we don't
populate the `bridge_interfaces` list.

The above gist renders into the following eni:

auto lo
iface lo inet loopback
    dns-nameservers 172.19.0.12

auto tap1a81968a-79
iface tap1a81968a-79 inet static
    address 172.19.1.34
    netmask 255.255.252.0
    post-up route add default gw 172.19.3.254 || true
    pre-down route del default gw 172.19.3.254 || true

Joshua Harlow (harlowja) wrote :

Seems good to me.

Scott Moser (smoser) wrote :

go ahead

review: Approve
Ryan Harper (raharper) wrote :

On hold, we're working out what to expect when we get type: bridge.

It appears that the network_metadata is exposing the compute node network
configuration (for example, type ovs, type: bridge)
These are how the computenode has configured networking for the guest.
 however, it's not exposing what it expects to do in the
guest.

For ovs, we translated that to a single ethernet device per entry; I think
we want to do the same for bridge.

The rackspace case with bonds, vlans and type: ethernet I think is
something that ironic might be doing here?

On Tue, May 24, 2016 at 3:00 PM, Scott Moser <email address hidden> wrote:

> Review: Approve
>
> go ahead
> --
>
> https://code.launchpad.net/~raharper/cloud-init/trunk.network-data-bridge/+merge/295591
> You are the owner of lp:~raharper/cloud-init/trunk.network-data-bridge.
>

review: Approve (continuous-integration)
Scott Moser (smoser) wrote :

Hello,
Thank you for taking the time to contribute to cloud-init. Cloud-init has moved its revision control system to git. As a result, we are marking all bzr merge proposals as 'rejected'. If you would like to re-submit this proposal for review, please do so by following the current HACKING documentation at http://cloudinit.readthedocs.io/en/latest/topics/hacking.html .

Unmerged revisions

1219. By Ryan Harper on 2016-05-24

ConfigDrive: Add support for "bridge" link types

Openstack Mikata LinuxBridge mode emits links with type: bridge
which need conversion into network config bridge. This patch
creates the require keys and copies in any keys from network_data.json
that start with 'bridge'. It's unclear whether the OpenStack
LinuxBridge mode provides the ability to attach interfaces to the
bridge so we do not attempt to populate the key 'bridge_interfaces' with
a specific value at this time.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloudinit/sources/DataSourceConfigDrive.py'
2--- cloudinit/sources/DataSourceConfigDrive.py 2016-04-29 13:04:36 +0000
3+++ cloudinit/sources/DataSourceConfigDrive.py 2016-05-24 14:39:39 +0000
4@@ -410,6 +410,15 @@
5 'vlan_id': link['vlan_id'],
6 'mac_address': link['vlan_mac_address'],
7 })
8+ elif link['type'] in ['bridge']:
9+ params = {}
10+ for k, v in link.items():
11+ if k.startswith('bridge'):
12+ params.update({k: v})
13+ cfg.update({
14+ 'params': params,
15+ 'bridge_interfaces': [],
16+ })
17 else:
18 raise ValueError(
19 'Unknown network_data link type: %s' % link['type'])