mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-11-18 19:41:05 +01:00
Adding FoU encapsulation over IPIP tunnel : added checks for restart and multi-node cases
This commit is contained in:
parent
6ce37e6167
commit
2a57d6c163
@ -767,11 +767,16 @@ func (nrc *NetworkRoutingController) setupOverlayTunnel(tunnelName string, nextH
|
|||||||
|
|
||||||
} else if nrc.overlayEncap == "fou" {
|
} else if nrc.overlayEncap == "fou" {
|
||||||
|
|
||||||
cmdArgs = append(cmdArgs, "fou", "add", "port", strconv.FormatInt(int64(nrc.overlayEncapPort), 10), "ipproto", "4")
|
cmdArgs = append(cmdArgs, "fou", "show")
|
||||||
out, err := exec.Command("ip", cmdArgs...).CombinedOutput()
|
out, err := exec.Command("ip", cmdArgs...).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil || !strings.Contains(string(out), strconv.FormatInt(int64(nrc.overlayEncapPort), 10)) {
|
||||||
return nil, fmt.Errorf("route not injected for the route advertised by the node %s "+
|
cmdArgs = ipBase
|
||||||
"Failed to set FoU tunnel port - error: %s, output: %s", tunnelName, err, string(out))
|
cmdArgs = append(cmdArgs, "fou", "add", "port", strconv.FormatInt(int64(nrc.overlayEncapPort), 10), "ipproto", "4")
|
||||||
|
out, err := exec.Command("ip", cmdArgs...).CombinedOutput()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("route not injected for the route advertised by the node %s "+
|
||||||
|
"Failed to set FoU tunnel port - error: %s, output: %s", tunnelName, err, string(out))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cmdArgs = ipBase
|
cmdArgs = ipBase
|
||||||
cmdArgs = append(cmdArgs,
|
cmdArgs = append(cmdArgs,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user