mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 05:34:46 +00:00
clh: Improve logging related to the net dev addition
Let's improve the log so we make it clear that we're only *actually* adding the net device to the Cloud Hypervisor configuration when calling our own version of VmAddNetPut(). Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
0b75522e1f
commit
ac5dbd8598
@ -161,6 +161,8 @@ var vmAddNetPutRequest = func(clh *cloudHypervisor) error {
|
|||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
||||||
for _, netDevice := range *clh.netDevices {
|
for _, netDevice := range *clh.netDevices {
|
||||||
|
clh.Logger().Infof("Adding the net device to the Cloud Hypervisor VM configuration: %+v", netDevice)
|
||||||
|
|
||||||
netDeviceAsJson, err := json.Marshal(netDevice)
|
netDeviceAsJson, err := json.Marshal(netDevice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -1465,10 +1467,6 @@ func (clh *cloudHypervisor) addNet(e Endpoint) error {
|
|||||||
}
|
}
|
||||||
clh.netDevicesFiles[mac] = netPair.TapInterface.VMFds
|
clh.netDevicesFiles[mac] = netPair.TapInterface.VMFds
|
||||||
|
|
||||||
clh.Logger().WithFields(log.Fields{
|
|
||||||
"mac": mac,
|
|
||||||
}).Info("Adding Net")
|
|
||||||
|
|
||||||
netRateLimiterConfig := clh.getNetRateLimiterConfig()
|
netRateLimiterConfig := clh.getNetRateLimiterConfig()
|
||||||
|
|
||||||
net := chclient.NewNetConfig()
|
net := chclient.NewNetConfig()
|
||||||
@ -1483,6 +1481,8 @@ func (clh *cloudHypervisor) addNet(e Endpoint) error {
|
|||||||
clh.netDevices = &[]chclient.NetConfig{*net}
|
clh.netDevices = &[]chclient.NetConfig{*net}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clh.Logger().Infof("Storing the Cloud Hypervisor network configuration: %+v", net)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user