Skip to content

Commit

Permalink
Fix name of switch for L2
Browse files Browse the repository at this point in the history
Co-Authored-by: Patryk Diak <pdiak@redhat.com>
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
  • Loading branch information
tssurya and kyrtapz committed Sep 3, 2024
1 parent f266215 commit 74debe3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ func expectedLogicalRouterPolicy(routerPolicyUUID1 string, netInfo util.NetInfo,
priority = 1004
rerouteAction = "reroute"
)
networkScopedNodeName := netInfo.GetNetworkScopedName(nodeName)
networkScopedNodeName := netInfo.GetNetworkScopedSwitchName(nodeName)
lrpName := fmt.Sprintf("%s%s", ovntypes.RouterToSwitchPrefix, networkScopedNodeName)
return &nbdb.LogicalRouterPolicy{
UUID: routerPolicyUUID1,
Expand Down
4 changes: 4 additions & 0 deletions go-controller/pkg/util/multi_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ func (nInfo *secondaryNetInfo) GetNetworkScopedGWRouterName(nodeName string) str
}

func (nInfo *secondaryNetInfo) GetNetworkScopedSwitchName(nodeName string) string {
// In Layer2Topology there is just one global switch
if nInfo.TopologyType() == types.Layer2Topology {
return fmt.Sprintf("%s%s", nInfo.getPrefix(), types.OVNLayer2Switch)
}
return nInfo.GetNetworkScopedName(nodeName)
}

Expand Down

0 comments on commit 74debe3

Please sign in to comment.