canonical/lxd

GetNetworkState can't detect bridge interfaces configured with OVS

Opened this issue · 0 comments

r00ta commented

Required information

We are NOT using LXD but rather LXD as a library, see https://github.com/canonical/maas/blob/7265eeecb055e573d8c40e63b3964c46e657bae6/src/host-info/pkg/info/info.go#L192

Issue description

GetNetworkState can't detect a bridge interface configured with OVS.

It returns

        "br-provider": {
            "addresses": [
                {
                    "family": "inet",
                    "address": "REDACTED",
                    "netmask": "20",
                    "scope": "global"
                },
                {
                    "family": "inet6",
                    "address": "REDACTED",
                    "netmask": "64",
                    "scope": "link"
                }
            ],
            "counters": {
                "bytes_received": 26676298785368,
                "bytes_sent": 3704328664385,
                "packets_received": 3148152714,
                "packets_sent": 111961554
            },
            "hwaddr": "REDACTED",
            "mtu": 1500,
            "state": "up",
            "type": "broadcast",
            "bond": null,
            "bridge": null,                               ----------------------------> This should not be `null`
            "vlan": null,
            "ovn": null
        }

Steps to reproduce

  1. Step one: Configure a machine with a bridge interface with OVS
  2. Step two: call GetNetworkState like in https://github.com/canonical/lxd/blob/main/lxd/resources/network.go#L603-L650