add logs for veth creation
Change-Id: I429eb3e20e1681bc0809274990c147bf817c686b
diff --git a/core/core_server.go b/core/core_server.go
index 964d704..841bf24 100644
--- a/core/core_server.go
+++ b/core/core_server.go
@@ -265,6 +265,7 @@
s.wg.Add(1)
ioinfos, veths, err := createIoinfos(s.Olt.ID, s.Vethnames, s.Onumap)
if err != nil {
+ logger.Error("createIoinfos failed.", err)
return err
}
s.Ioinfos = ioinfos
@@ -276,6 +277,7 @@
s.cancel = cancel
if err = s.runPacketInDaemon(child, stream); err != nil {
+ logger.Error("runPacketInDaemon failed.", err)
return err
}
return nil
@@ -298,6 +300,7 @@
onuid := onumap[intfid][i].OnuID
uniup, unidw := makeUniName(oltid, intfid, onuid)
if handler, Vethnames, err = setupVethHandler(uniup, unidw, Vethnames); err != nil {
+ logger.Error("setupVethHandler failed (onuid: %d)", onuid, err)
return ioinfos, Vethnames, err
}
iinfo := Ioinfo{Name: uniup, iotype: "uni", ioloc: "inside", intfid: intfid, onuid: onuid, handler: handler}
@@ -310,6 +313,7 @@
var handler *pcap.Handle
nniup, nnidw := makeNniName(oltid)
if handler, Vethnames, err = setupVethHandler(nniup, nnidw, Vethnames); err != nil {
+ logger.Error("setupVethHandler failed for nni", err)
return ioinfos, Vethnames, err
}