[18.02][next] veth + linux bridge workaround does not work correctly: no source directive in /e/n/i and long interface names

Bug #1773353 reported by Dmitrii Shcherbakov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Neutron Gateway Charm
Fix Released
High
James Page
OpenStack Neutron Open vSwitch Charm
Fix Released
High
James Page

Bug Description

There are two problems currently:

1) veth interface config files are not sourced in /etc/network/interfaces (there is no "source" directive there to pick them up) /etc/network/interfaces.d/veth-br-enp4s0f0.cfg.cfg

ls /etc/network/interfaces.d/
50-cloud-init.cfg veth-br-enp4s0f0.cfg

https://paste.ubuntu.com/p/Y497Xh8CVj/
Unknown interface veth-br-enp4s0f0

Juju deliberately does not make /etc/newtork/interfaces/ source 50-cloud-init.cfg because it contains the original network settings generated by cloud-init based on information provided by MAAS - it replaces it with a new interfaces file that has linux bridges formed out of the originally configured interfaces.

2) interface names are too long

After I manually added a source directive for further testing

grep source /etc/network/interfaces
source /etc/network/interfaces.d/veth-br-enp4s0f0.cfg

ifup started to complain about the length of the veth interface name:

ifup veth-br-enp4s0f0
Error: argument "veth-br-enp4s0f0" is wrong: "name" too long

Failed to bring up veth-br-enp4s0f0.

This problem is similar to https://pad.lv/1672327 but this time juju has nothing to do with interface naming as it is generated in the charm itself.

The 15-character (byte) name length limit is kernel-level https://bugs.launchpad.net/juju/+bug/1672327/comments/14

=====

/e/n/i example without source directive:
https://paste.ubuntu.com/p/KgNND9skBw/

MAAS version:

{"subversion": "6498-ge4db91d-0ubuntu1~16.04.1", "version": "2.3.3", "capabilities": ["networks-management", "static-ipaddresses", "ipv6-deployment-ubuntu", "devices-management", "storage-deployment-ubuntu", "network-deployment-ubuntu", "bridging-interface-ubuntu", "bridging-automatic-ubuntu", "authenticate-api"]}

Juju: 2.4-beta3

Tags: cpe-onsite
summary: - veth workaround does not work properly
+ [18.02][next] veth + linux bridge workaround does not work correctly: no
+ source directive in /e/n/i and long interface names
description: updated
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Suggested an approach to fixing the interface name length issue here:

https://bugs.launchpad.net/charm-neutron-gateway/+bug/1773429/comments/1

James Page (james-page)
Changed in charm-neutron-gateway:
status: New → Triaged
Changed in charm-neutron-openvswitch:
status: New → Triaged
Changed in charm-neutron-gateway:
importance: Undecided → High
Changed in charm-neutron-openvswitch:
importance: Undecided → High
Changed in charm-neutron-gateway:
assignee: nobody → James Page (james-page)
Changed in charm-neutron-openvswitch:
assignee: nobody → James Page (james-page)
Changed in charm-neutron-gateway:
milestone: none → 18.08
Changed in charm-neutron-openvswitch:
milestone: none → 18.08
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-gateway (master)

Fix proposed to branch: master
Review: https://review.openstack.org/574277

Changed in charm-neutron-gateway:
status: Triaged → In Progress
Changed in charm-neutron-openvswitch:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-openvswitch (master)

Fix proposed to branch: master
Review: https://review.openstack.org/574278

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-openvswitch (master)

Reviewed: https://review.openstack.org/574278
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-openvswitch/commit/?id=03016e4cc4de6b653a89efc48a183f77accba075
Submitter: Zuul
Branch: master

commit 03016e4cc4de6b653a89efc48a183f77accba075
Author: James Page <email address hidden>
Date: Mon Jun 11 15:28:34 2018 +0100

    Resolve issues with long interface names

    Resync charm helpers to pickup fixes to support veth wiring of
    OVS bridges directly to Linux bridges created with MAAS.

    Linux has a maximum interface name length of 15 charms; the
    change ensures that the generated interface length for the veth
    pair fits within this limitation.

    Previous behaviour (that worked) is preserved to avoid duplicate
    veth wiring or direct wiring of the Linux bridge to OVS.

    Change-Id: Icef4efc179e8f812dd08f2423ed832a48573aa75
    Closes-Bug: 1773353

Changed in charm-neutron-openvswitch:
status: In Progress → Fix Committed
Changed in charm-neutron-gateway:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-gateway (master)

Reviewed: https://review.openstack.org/574277
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-gateway/commit/?id=2a7749333c6c25d97ed904fbf8207687e1f02955
Submitter: Zuul
Branch: master

commit 2a7749333c6c25d97ed904fbf8207687e1f02955
Author: James Page <email address hidden>
Date: Mon Jun 11 15:25:18 2018 +0100

    Resolve issues with long interface names

    Resync charm helpers to pickup fixes to support veth wiring of
    OVS bridges directly to Linux bridges created with MAAS.

    Linux has a maximum interface name length of 15 charms; the
    change ensures that the generated interface length for the veth
    pair fits within this limitation.

    Previous behaviour (that worked) is preserved to avoid duplicate
    veth wiring or direct wiring of the Linux bridge to OVS.

    Change-Id: I294dc7c05b7c08503ef200707e0f9b1d1c199843
    Closes-Bug: 1773353

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

On bionic deploys, this fails because of the switch to netplan on config-changed with:

FileNotFoundError: [Errno 2] No such file or directory: '/etc/network/interfaces.d/veth-br0.cfg'

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
David Ames (thedac)
Changed in charm-neutron-gateway:
status: Fix Committed → Fix Released
Changed in charm-neutron-openvswitch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.