Skip to content

Commit

Permalink
chore: add few logs
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Aug 11, 2023
1 parent ac57ea2 commit 161b2a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/evpn/vrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (s *Server) CreateVrf(_ context.Context, in *pb.CreateVrfRequest) (*pb.Vrf,
// Example: ip link add br100 type bridge
bridgeName := fmt.Sprintf("br%d", in.Vrf.Spec.Vni)
bridge := &netlink.Bridge{LinkAttrs: netlink.LinkAttrs{Name: bridgeName}}
log.Printf("Creating Linux Bridge %v", bridge)
if err := netlink.LinkAdd(bridge); err != nil {
fmt.Printf("Failed to create Bridge link: %v", err)
return nil, err
Expand All @@ -119,6 +120,7 @@ func (s *Server) CreateVrf(_ context.Context, in *pb.CreateVrfRequest) (*pb.Vrf,
binary.BigEndian.PutUint32(myip, in.Vrf.Spec.VtepIpPrefix.Addr.GetV4Addr())
// TODO: take Port from proto instead of hard-coded
vxlan := &netlink.Vxlan{LinkAttrs: netlink.LinkAttrs{Name: vxlanName}, VxlanId: int(in.Vrf.Spec.Vni), Port: 4789, Learning: false, SrcAddr: myip}
log.Printf("Creating VXLAN %v", vxlan)
if err := netlink.LinkAdd(vxlan); err != nil {
fmt.Printf("Failed to create Vxlan link: %v", err)
return nil, err
Expand Down

0 comments on commit 161b2a9

Please sign in to comment.