Skip to content

Commit e5212ce

Browse files
committed
incusd/network/ovn: Remove internal routes to forward/load-balancers
This was added thinking it would be desirable for OVN-IC environments, but feedback is that production OVN-IC users prefer that traffic to go through an external path. Given that, remove the logic and if the needs come back, we'll handled it through an interconnection option so this can be configurable for a particular environment. Signed-off-by: Stéphane Graber <[email protected]> Sponsored-by: Luizalabs (https://luizalabs.com)
1 parent 6553e22 commit e5212ce

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

internal/server/network/driver_ovn.go

-50
Original file line numberDiff line numberDiff line change
@@ -5115,31 +5115,6 @@ func (n *ovn) ForwardCreate(forward api.NetworkForwardsPost, clientType request.
51155115
return fmt.Errorf("Failed applying OVN load balancer: %w", err)
51165116
}
51175117

5118-
// Add internal static route to the network forward (helps with OVN IC).
5119-
var nexthop net.IP
5120-
if listenAddressNet.IP.To4() == nil {
5121-
routerV6, _, err := n.parseRouterIntPortIPv6Net()
5122-
if err == nil {
5123-
nexthop = routerV6
5124-
}
5125-
} else {
5126-
routerV4, _, err := n.parseRouterIntPortIPv4Net()
5127-
if err == nil {
5128-
nexthop = routerV4
5129-
}
5130-
}
5131-
5132-
if nexthop != nil {
5133-
err = n.ovnnb.CreateLogicalRouterRoute(context.TODO(), n.getRouterName(), true, networkOVN.OVNRouterRoute{NextHop: nexthop, Prefix: *listenAddressNet})
5134-
if err != nil {
5135-
return err
5136-
}
5137-
5138-
revert.Add(func() {
5139-
_ = n.ovnnb.DeleteLogicalRouterRoute(context.TODO(), n.getRouterName(), *listenAddressNet)
5140-
})
5141-
}
5142-
51435118
// Notify all other members to refresh their BGP prefixes.
51445119
notifier, err := cluster.NewNotifier(n.state, n.state.Endpoints.NetworkCert(), n.state.ServerCert(), cluster.NotifyAll)
51455120
if err != nil {
@@ -5501,31 +5476,6 @@ func (n *ovn) LoadBalancerCreate(loadBalancer api.NetworkLoadBalancersPost, clie
55015476
return fmt.Errorf("Failed applying OVN load balancer: %w", err)
55025477
}
55035478

5504-
// Add internal static route to the load-balancer (helps with OVN IC).
5505-
var nexthop net.IP
5506-
if listenAddressNet.IP.To4() == nil {
5507-
routerV6, _, err := n.parseRouterIntPortIPv6Net()
5508-
if err == nil {
5509-
nexthop = routerV6
5510-
}
5511-
} else {
5512-
routerV4, _, err := n.parseRouterIntPortIPv4Net()
5513-
if err == nil {
5514-
nexthop = routerV4
5515-
}
5516-
}
5517-
5518-
if nexthop != nil {
5519-
err = n.ovnnb.CreateLogicalRouterRoute(context.TODO(), n.getRouterName(), true, networkOVN.OVNRouterRoute{NextHop: nexthop, Prefix: *listenAddressNet})
5520-
if err != nil {
5521-
return err
5522-
}
5523-
5524-
revert.Add(func() {
5525-
_ = n.ovnnb.DeleteLogicalRouterRoute(context.TODO(), n.getRouterName(), *listenAddressNet)
5526-
})
5527-
}
5528-
55295479
// Notify all other members to refresh their BGP prefixes.
55305480
notifier, err := cluster.NewNotifier(n.state, n.state.Endpoints.NetworkCert(), n.state.ServerCert(), cluster.NotifyAll)
55315481
if err != nil {

0 commit comments

Comments
 (0)