[ovs-discuss] watch_group liveness check for OVS groups

Ben Pfaff blp at ovn.org
Thu Jan 21 19:35:09 UTC 2021

On Thu, Jan 21, 2021 at 08:20:16PM +0100, Alexander Constantinescu wrote:
> Hi,
> TL;DR: I am wondering if there's any specific action/convention that needs
> to be defined for groups which are referenced by a watch_group, as to have
> the liveness check correctly working? FYI: I can't use a liveness check on
> a dedicated OVS port in this case.
> I have not been able to find much documentation surrounding watch_group,
> the only doc I've been basing myself on is:
> http://www.openvswitch.org/support/dist-docs/ovs-ofctl.8.html
> I am working on a POC where the goal of my work is to load balance packets
> between two nexthops for packets matching a given flow. Essentially, I have
> this flow which gets hit:
>  cookie=0x0, duration=12657.001s, table=100, n_packets=1423,
> n_bytes=113190, priority=100,ip,reg0=0x5d41f9 actions=group:2
> for which I have the following groups defined:
>  group_id=3,type=select,bucket=weight:100,actions=ct(commit),move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:>tun_dst,output:vxlan0
> group_id=2,type=select,bucket=weight:100,watch_group:3,actions=group:3,bucket=weight:100,watch_group:4,actions=group:4
>  group_id=4,type=select,bucket=weight:100,actions=ct(commit),move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:>tun_dst,output:vxlan0
> Group 2 thus load balances between group 3 (which forwards packets to
> nexthop and 4 (corresponding to nexthop in an equal
> way.
> The load balancing works, however the watch_group does not seem to have any
> impact, and what I mean by that is: if I shutdown the nodes corresponding
> to either of my nexthops, group 2 will still try to send packets to the
> nexthop (node) which I've just shut down.

I think that the problem is that groups 3 and 4 don't have any liveness
criteria defined, so they are always considered live.  Try adding a
watch_port to each of them.

More information about the discuss mailing list