Comment 9 for bug 1965883

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote (last edit ):

Thanks for testing.

OVN should periodically send RAs based on the options specified in the northbound DB (send_periodic, max_interval, min_interval).

https://github.com/ovn-org/ovn/commit/c04c004efaf64b77460de5338092e642385e582d
https://github.com/ovn-org/ovn/commit/ec5bcc68b34e73b8541f3143dd1f69a8e884cbef

https://github.com/ovn-org/ovn/blob/ed9bb4d59f78d14300d27d68fd2c4ec4621f2256/controller/pinctrl.c#L3818-L3893
https://github.com/ovn-org/ovn/blob/ed9bb4d59f78d14300d27d68fd2c4ec4621f2256/controller/pinctrl.c#L3404

The Logical_Router_Port table in the ovn-nb may contain the following based on the docs:

https://man7.org/linux/man-pages/man5/ovn-nb.5.html#Logical_Router_Port_TABLE
         ipv6_ra_configs : send_periodic
                                     optional string
         ipv6_ra_configs : max_interval
                                     optional string
         ipv6_ra_configs : min_interval
                                     optional string

On an ovn-central unit the following should show LRPs:

ovn-nbctl list Logical_Router_Port

====

As far as Neutron is concerned, `send_periodic` is applied only to internal networks where as intervals are not explicitly set:

https://github.com/openstack/neutron/blob/dd55f1acd36dee4ab4ec806a694b5efcc8e53cb8/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L1169-L1175
                ipv6_ra_configs['send_periodic'] = 'true'
                if is_gw_port and utils.is_provider_network(net):
                    ipv6_ra_configs['send_periodic'] = 'false'

https://github.com/openstack/neutron/blob/dd55f1acd36dee4ab4ec806a694b5efcc8e53cb8/neutron/common/ovn/utils.py#L526-L527
def is_provider_network(network):
    return network.get(external_net.EXTERNAL, False)

Intervals for RAs in OVN are both set per RFC 4861 section 6.2.1 (https://datatracker.ietf.org/doc/html/rfc4861#section-6.2.1):

https://github.com/ovn-org/ovn/blob/ed9bb4d59f78d14300d27d68fd2c4ec4621f2256/controller/pinctrl.c#L3588-L3591
    config->max_interval = smap_get_int(&pb->options, "ipv6_ra_max_interval",
            ND_RA_MAX_INTERVAL_DEFAULT);
    config->min_interval = smap_get_int(&pb->options, "ipv6_ra_min_interval",
            nd_ra_min_interval_default(config->max_interval));

https://github.com/openvswitch/ovs/blob/31b467a751892df2dd938338d91d39e995a6a18c/lib/packets.h#L1083
#define ND_RA_MAX_INTERVAL_DEFAULT 600

https://github.com/openvswitch/ovs/blob/31b467a751892df2dd938338d91d39e995a6a18c/lib/packets.h#L1085-L1089
static inline int
nd_ra_min_interval_default(int max)
{
    return max >= 9 ? max / 3 : max * 3 / 4;
}

So it should be min_interval = 600 / 3 seconds = 200 seconds