Skip to content

Commit 63548ed

Browse files
chore: Removing CNI logs that are not useful (#2065)
removed logs that's spamming and not useful Co-authored-by: Ramiro <[email protected]>
1 parent b1a63a9 commit 63548ed

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

cni/network/network.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,6 @@ func (plugin *NetPlugin) Start(config *common.PluginConfig) error {
153153
zap.String("version", plugin.Version),
154154
zap.String("component", "cni-net"))
155155

156-
log.Logger.Info("Os Info",
157-
zap.String("platform", platform.GetOSInfo()),
158-
zap.String("component", "cni-net"))
159-
platform.PrintDependencyPackageDetails()
160-
common.LogNetworkInterfaces()
161-
162156
// Initialize network manager. rehyrdration not required on reboot for cni plugin
163157
err = plugin.nm.Initialize(config, false)
164158
if err != nil {

network/endpoint.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ func (nw *network) newEndpoint(
133133
}
134134

135135
nw.Endpoints[epInfo.Id] = ep
136-
log.Printf("[net] Created endpoint %+v.", ep)
137-
136+
log.Printf("[net] Created endpoint %+v. Num of endpoints:%d", ep, len(nw.Endpoints))
138137
return ep, nil
139138
}
140139

@@ -165,9 +164,7 @@ func (nw *network) deleteEndpoint(nl netlink.NetlinkInterface, plc platform.Exec
165164

166165
// Remove the endpoint object.
167166
delete(nw.Endpoints, endpointID)
168-
169-
log.Printf("[net] Deleted endpoint %+v.", ep)
170-
167+
log.Printf("[net] Deleted endpoint %+v. Num of endpoints:%d", ep, len(nw.Endpoints))
171168
return nil
172169
}
173170

network/manager.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,6 @@ func (nm *networkManager) restore(isRehydrationRequired bool) error {
214214
}
215215

216216
log.Printf("[net] Restored state")
217-
for _, extIf := range nm.ExternalInterfaces {
218-
for _, nw := range extIf.Networks {
219-
log.Printf("Number of endpoints: %d", len(nw.Endpoints))
220-
}
221-
}
222-
223217
return nil
224218
}
225219

platform/os_linux.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ func PrintDependencyPackageDetails() {
171171
out, err := p.ExecuteCommand("iptables --version")
172172
out = strings.TrimSuffix(out, "\n")
173173
log.Printf("[cni-net] iptable version:%s, err:%v", out, err)
174-
out, err = p.ExecuteCommand("ebtables --version")
175-
out = strings.TrimSuffix(out, "\n")
176-
log.Printf("[cni-net] ebtable version %s, err:%v", out, err)
177174
}
178175

179176
func ReplaceFile(source, destination string) error {

0 commit comments

Comments
 (0)