Skip to content

Commit 4834e3d

Browse files
committed
Fix log, reuse existing function in GetNetworkScopedSwitchName.
Signed-off-by: Nadia Pinaeva <[email protected]>
1 parent 77124b8 commit 4834e3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

go-controller/pkg/ovn/gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func (gw *GatewayManager) createGWRouterPeerPort(nodeName string) error {
354354
if gw.netInfo.TopologyType() == types.Layer2Topology {
355355
node, err := gw.watchFactory.GetNode(nodeName)
356356
if err != nil {
357-
return fmt.Errorf("failed to fetch node %s from watch factory %w", node, err)
357+
return fmt.Errorf("failed to fetch node %s from watch factory %w", node.Name, err)
358358
}
359359
tunnelID, err := util.ParseUDNLayer2NodeGRLRPTunnelIDs(node, gw.netInfo.GetNetworkName())
360360
if err != nil {

go-controller/pkg/util/multi_network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ func (nInfo *secondaryNetInfo) GetNetworkScopedGWRouterName(nodeName string) str
709709
func (nInfo *secondaryNetInfo) GetNetworkScopedSwitchName(nodeName string) string {
710710
// In Layer2Topology there is just one global switch
711711
if nInfo.TopologyType() == types.Layer2Topology {
712-
return fmt.Sprintf("%s%s", nInfo.getPrefix(), types.OVNLayer2Switch)
712+
return nInfo.GetNetworkScopedName(types.OVNLayer2Switch)
713713
}
714714
return nInfo.GetNetworkScopedName(nodeName)
715715
}

0 commit comments

Comments
 (0)