Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetNetworkState can't detect bridge interfaces configured with OVS #14606

Open
r00ta opened this issue Dec 9, 2024 · 0 comments · May be fixed by #15044
Open

GetNetworkState can't detect bridge interfaces configured with OVS #14606

r00ta opened this issue Dec 9, 2024 · 0 comments · May be fixed by #15044
Labels
Improvement Improve to current situation
Milestone

Comments

@r00ta
Copy link

r00ta commented Dec 9, 2024

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
@tomponline tomponline added the Improvement Improve to current situation label Dec 9, 2024
@tomponline tomponline added this to the lxd-6.3 milestone Dec 9, 2024
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 21, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 21, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
@ghadi-rahme ghadi-rahme linked a pull request Feb 21, 2025 that will close this issue
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 21, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 21, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 21, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 25, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
tomponline added a commit that referenced this issue Feb 28, 2025
State was imported only to get some config keys for setting up the OVN
command connection arguments. We should try to not import state where
possible, and only import the fields we need at the lowest level. This
helps not only with reducing the size of imports, but also for use of
packages externally, and also for unit testing.

This is required for using the OVS package externally. See #15044 and
#14606. cc @ghadi-rahme
ghadi-rahme added a commit to ghadi-rahme/lxd that referenced this issue Feb 28, 2025
…tion

This allows OVS bridge information to be read by LXD. Other
applications such as MAAS make use of this function and require
the ability to retrieve OVS bridge information.

Fixes canonical#14606

Signed-off-by: Ghadi Elie Rahme <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants