Skip to content

Commit

Permalink
CNI Telemetry enabled on CNS
Browse files Browse the repository at this point in the history
  • Loading branch information
behzad-mir committed Nov 1, 2023
1 parent b3959bc commit 8f2cedf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cns/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ var args = acn.ArgumentList{
Shorthand: acn.OptTelemetryServiceAlias,
Description: "Flag to start telemetry service to receive telemetry events from CNI. Default, disabled.",
Type: "bool",
DefaultValue: true,
DefaultValue: false,
},
{
Name: acn.OptCNIConflistFilepath,
Expand Down Expand Up @@ -621,8 +621,8 @@ func main() {
logger.InitAI(aiConfig, ts.DisableTrace, ts.DisableMetric, ts.DisableEvent)
}
}
telemetryDaemonEnabled = disableTelemetry
if !telemetryDaemonEnabled {
if telemetryDaemonEnabled {
log.Printf("CNI Telemtry is enabled")
go startTelemetryService(rootCtx)
}

Expand Down
6 changes: 4 additions & 2 deletions network/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ func (nm *networkManager) Initialize(config *common.PluginConfig, isRehydrationR
nm.Version = config.Version
nm.store = config.Store
if config.Stateless {
err := nm.SetStatelessCNIMode()
return errors.Wrapf(err, "Failed to initialize stateles CNI")
if err := nm.SetStatelessCNIMode(); err != nil {
return errors.Wrapf(err, "Failed to initialize stateles CNI")
}
return nil
}

// Restore persisted state.
Expand Down

0 comments on commit 8f2cedf

Please sign in to comment.