mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-22 16:54:25 +01:00
network: Always call network logger function
Rather than using the virtcontainers logger, always call the network logger function. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
@@ -489,7 +489,7 @@ func (n *NetworkNamespace) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
endpoints = append(endpoints, &endpoint)
|
endpoints = append(endpoints, &endpoint)
|
||||||
virtLog.Infof("Physical endpoint unmarshalled [%v]", endpoint)
|
networkLogger().Infof("Physical endpoint unmarshalled [%v]", endpoint)
|
||||||
|
|
||||||
case VirtualEndpointType:
|
case VirtualEndpointType:
|
||||||
var endpoint VirtualEndpoint
|
var endpoint VirtualEndpoint
|
||||||
@@ -499,7 +499,7 @@ func (n *NetworkNamespace) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
endpoints = append(endpoints, &endpoint)
|
endpoints = append(endpoints, &endpoint)
|
||||||
virtLog.Infof("Virtual endpoint unmarshalled [%v]", endpoint)
|
networkLogger().Infof("Virtual endpoint unmarshalled [%v]", endpoint)
|
||||||
|
|
||||||
case VhostUserEndpointType:
|
case VhostUserEndpointType:
|
||||||
var endpoint VhostUserEndpoint
|
var endpoint VhostUserEndpoint
|
||||||
@@ -509,10 +509,10 @@ func (n *NetworkNamespace) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
endpoints = append(endpoints, &endpoint)
|
endpoints = append(endpoints, &endpoint)
|
||||||
virtLog.Infof("VhostUser endpoint unmarshalled [%v]", endpoint)
|
networkLogger().Infof("VhostUser endpoint unmarshalled [%v]", endpoint)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
virtLog.Errorf("Unknown endpoint type received %s\n", e.Type)
|
networkLogger().Errorf("Unknown endpoint type received %s\n", e.Type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1010,7 +1010,7 @@ func untapNetworkPair(netPair NetworkInterfacePair) error {
|
|||||||
vethLink, err := getLinkByName(netHandle, netPair.VirtIface.Name, &netlink.Veth{})
|
vethLink, err := getLinkByName(netHandle, netPair.VirtIface.Name, &netlink.Veth{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// The veth pair is not totally managed by virtcontainers
|
// The veth pair is not totally managed by virtcontainers
|
||||||
virtLog.Warnf("Could not get veth interface %s: %s", netPair.VirtIface.Name, err)
|
networkLogger().Warnf("Could not get veth interface %s: %s", netPair.VirtIface.Name, err)
|
||||||
} else {
|
} else {
|
||||||
if err := netHandle.LinkSetDown(vethLink); err != nil {
|
if err := netHandle.LinkSetDown(vethLink); err != nil {
|
||||||
return fmt.Errorf("Could not disable veth %s: %s", netPair.VirtIface.Name, err)
|
return fmt.Errorf("Could not disable veth %s: %s", netPair.VirtIface.Name, err)
|
||||||
@@ -1062,7 +1062,7 @@ func unBridgeNetworkPair(netPair NetworkInterfacePair) error {
|
|||||||
vethLink, err := getLinkByName(netHandle, netPair.VirtIface.Name, &netlink.Veth{})
|
vethLink, err := getLinkByName(netHandle, netPair.VirtIface.Name, &netlink.Veth{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// The veth pair is not totally managed by virtcontainers
|
// The veth pair is not totally managed by virtcontainers
|
||||||
virtLog.WithError(err).Warn("Could not get veth interface")
|
networkLogger().WithError(err).Warn("Could not get veth interface")
|
||||||
} else {
|
} else {
|
||||||
if err := netHandle.LinkSetDown(vethLink); err != nil {
|
if err := netHandle.LinkSetDown(vethLink); err != nil {
|
||||||
return fmt.Errorf("Could not disable veth %s: %s", netPair.VirtIface.Name, err)
|
return fmt.Errorf("Could not disable veth %s: %s", netPair.VirtIface.Name, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user