Hi,
On Mon, 2021-05-24 at 14:35 -0700, Abu Rasheda via networkmanager-list
wrote:
> Hello,
>
> I am seeing two issues with NM and ovsdb. Issue # 2 is more critical.
>
> In my configuration, I have two bridges in OVS. On one of the bridge,
> the interface needs to be under Network Manager, so I have changed
> commands to:
>
> nmcli conn add type ovs-bridge conn.interface
> nmcli conn add type ovs-port conn.interface
> nmcli conn add type ovs-interface slave-type ovs-port conn.interface
> nmcli conn add type ethernet conn.interface
these commands are not complete and not working. Could you share the
full commands?
I can share in the morning, just wanted to reply before I go to bed :)
also, after you created the profiles (an activate them), what gives
`nmcli connection`, `nmcli device` and `ovs-vsctl show` ?
Again these work perfectly fine.
> On the other bridge, I am still using, e.g.
>
> ovs-vsctl --timeout=5 add-br
>
> Also, there are a bunch of places where ovs-vsctl is used for reading,
> e.g.
>
> ovs-vsctl list-ports
>
>
>
> The issues I am seeing are:
>
> (1) For Interface/ports created via nmcli, sometimes I have issue
> deleting them:
>
> I see the config file in /etc/NetworkManager/system-connections/ovs-
> slave-port1
>
> nmcli c delete ovs-slave-port1
>
> I get something like, this device does not exist (I have seen this
> error once)
This merely deletes a profile in NetworkManager. This always should
succeed, and there is no reason why it can fail (except bugs). But
there is not enough information provided, to understand what exactly
fails. The message "device does not exist" doesn't make sense for this
command. Please share the literal error messages by quoting them, not
paraphrasing.
Understand, just wanted to mention this. if it happens again, I will capture the whole message.
Also, please always collect `level=TRACE` logs of NetworkManager. See
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/9eac9c846c6bb7b0baa77b72638aaf79df4a5ca6/contrib/fedora/rpm/NetworkManager.conf#L29
for hints about logging.
Okay.
>
> Following is a more important issue
>
> (2) In some situations, commands like the following would timeout:
>
> ovs-vsctl --timeout=5 add-port bridge1 port1
>
> If I run the above command without --timeout, this will never return.
> However, if I let it timeout or ctrl-c and use ovs-vsctl show, it
> shows that port1 is created.
Are "bridge1" and "port1" the actual names, or is this an example?
example
>
> I ran this under strace and saw ovs-vsctl is stuck at poll call. I
> have also seen
>
> cat ovsdb-server.log
> 2021-05-
> 24T14:13:11.930Z|00003|reconnect|INFO|unix:/var/run/vmware/nsx-
> agent/nsxagent_ovsdb.sock: connecting...
> 2021-05-
> 24T14:13:11.930Z|00004|reconnect|INFO|unix:/var/run/vmware/nsx-
> agent/nsxagent_ovsdb.sock: connection attempt failed (No such file or
> directory)
I am no tfamiliar with OVS, but this doesn't seem relevant. Is
something else in those logs?
>
> It connects fine when using ovs-vsctl show
>
> Question:
>
> 1. Is it okay to use both nmcli and ovs-vsctl to create
> bridges/ports/interfaces (when they are under different bridges)?
yes (presumably)
did you test that not using NetworkManager in parallel avoids the
problem?
the whole system works perfectly fine without NM and has been using it for years :)
NetworkManager talks directly to ovsdb, like ovsvs-ctl does. Deactivate
all OVS profiles in NetworkManager (check `nmcli connnection` and
`nmcli conneciton down "$PROFILE"`). Then also check that nothing is
left over in ovsdb from NetworkManager (with `ovs-vsctl show`). Then
perform the steps on the other bridge. Do they work?
I have not tried this.
Even now `ovs-vsctl show` output is correct. The issue is ovs-vsctl del-port does not return. Seems like db is not responding. I wanted to check if anyone has seen this before.
Just thinking out loud, Did NM put db in such a state?
Any ideas? otherwise need to debug what is going on
>
> 2. Have anyone seen these errors?
>
I didn't.
best,
Thomas