Skip to content

Commit

Permalink
fix odd number of key-value in error logs
Browse files Browse the repository at this point in the history
a recent refactor to logging introduced these issues[1].
fix them to avoid panic during runtime

[1] c155c82

Signed-off-by: adrianc <[email protected]>
  • Loading branch information
adrianchiris committed Nov 9, 2023
1 parent e35bc9e commit 7d9eca4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (dn *Daemon) Run(stopCh <-chan struct{}, exitCh <-chan error) error {
log.Log.V(0).Info("Run(): stop daemon")
return nil
case err, more := <-exitCh:
log.Log.Error(err, "got an error", err)
log.Log.Error(err, "got an error")
if more {
dn.refreshCh <- Message{
syncStatus: syncStatusFailed,
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/mellanox/mellanox_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func getMlnxNicFwData(pciAddress string) (current, next *mlnxNic, err error) {

out, err := utils.MstConfigReadData(pciAddress)
if err != nil {
log.Log.Error(err, "mellanox-plugin getMlnxNicFwData(): failed", err)
log.Log.Error(err, "mellanox-plugin getMlnxNicFwData(): failed")
return
}
mstCurrentData, mstNextData := utils.ParseMstconfigOutput(out, attrs)
Expand Down
2 changes: 1 addition & 1 deletion pkg/systemd/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func WriteSriovResult(result *SriovResult) error {

out, err := yaml.Marshal(result)
if err != nil {
log.Log.Error(err, "WriteSriovResult(): failed to marshal sriov result", err)
log.Log.Error(err, "WriteSriovResult(): failed to marshal sriov result")
return err
}

Expand Down

0 comments on commit 7d9eca4

Please sign in to comment.