Comment 22 for bug 1912844

Revision history for this message
Dan Watkins (oddbloke) wrote :

Hey Frode,

Now moving on from the "does this system have any OVS-managed interfaces?" to "how can I tell if a particular interface is managed by OVS?":

We discussed using `udevadm info` to determine if an interface is OVS-managed:

> If it is sufficient to know that this is a Open vSwitch managed port I guess we could get that from udev, for example:
>
> # udevadm info /sys/class/net/enp6s0.9
> ...
> E: ID_NET_DRIVER=openvswitch
> ...

But later we also discussed that OVS-managed interfaces may not be owned by the `openvswitch` kernel driver:

> Open vSwitch supports multiple datapath types, and depending on which one you use the interface may or may not be owned by the openvswitch driver.

It looks to me like these two statements are in opposition: if OVS is managing an interface via a different datapath, then it won't have ID_NET_DRIVER=openvswitch in its `udevadm info`.

If this is the case, then I think we have a couple of options.

Firstly, we could scope this down to only handle system datapath interfaces, so that it _is_ true that all the interfaces we're handling are owned by the openvswitch. I don't know enough about how OVS is used (either by us or more generally) to know if this is a reasonable suggestion, so your guidance would be appreciated.

If we can't do that, then I think we need to ask OVS directly, presumably via `ovs-vsctl show` as discussed above. This would require it to be in PATH, of course; avoiding that is a nice-to-have at best, so I think that's fine.

Does that sound right to you?