Skip to content

Commit b9c70f0

Browse files
committed
Fix %w usage in klog.Errorf
Signed-off-by: Evan Lezar <[email protected]>
1 parent 6687442 commit b9c70f0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmd/nvidia-dra-plugin/driver.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ func (d *driver) CleanupStaleStateContinuously(ctx context.Context) {
198198
for {
199199
resourceVersion, err := d.cleanupStaleStateOnce(ctx)
200200
if err != nil {
201-
klog.Errorf("Error cleaning up stale claim state: %w", err)
201+
klog.Errorf("Error cleaning up stale claim state: %v", err)
202202
}
203203

204204
err = d.cleanupStaleStateContinuously(ctx, resourceVersion, err)
205205
if err != nil {
206-
klog.Errorf("Error cleaning up stale claim state: %w", err)
206+
klog.Errorf("Error cleaning up stale claim state: %v", err)
207207
time.Sleep(CleanupTimeoutSecondsOnError * time.Second)
208208
}
209209
}
@@ -279,7 +279,7 @@ func (d *driver) cleanupStaleState(ctx context.Context, nas *nascrd.NodeAllocati
279279
go func() {
280280
count := 0
281281
for err := range caErrors {
282-
klog.Errorf("Error cleaning up claim allocations: %w", err)
282+
klog.Errorf("Error cleaning up claim allocations: %v", err)
283283
count++
284284
}
285285
errorCounts <- count
@@ -290,7 +290,7 @@ func (d *driver) cleanupStaleState(ctx context.Context, nas *nascrd.NodeAllocati
290290
go func() {
291291
count := 0
292292
for err := range cdiErrors {
293-
klog.Errorf("Error cleaning up CDI files: %w", err)
293+
klog.Errorf("Error cleaning up CDI files: %v", err)
294294
count++
295295
}
296296
errorCounts <- count
@@ -301,7 +301,7 @@ func (d *driver) cleanupStaleState(ctx context.Context, nas *nascrd.NodeAllocati
301301
go func() {
302302
count := 0
303303
for err := range mpsErrors {
304-
klog.Errorf("Error cleaning up MPS control daemon artifacts: %w", err)
304+
klog.Errorf("Error cleaning up MPS control daemon artifacts: %v", err)
305305
count++
306306
}
307307
errorCounts <- count

cmd/nvidia-dra-plugin/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func StartPlugin(ctx context.Context, config *Config) error {
191191

192192
err = driver.Shutdown(ctx)
193193
if err != nil {
194-
klog.Errorf("Unable to cleanly shutdown driver: %w", err)
194+
klog.Errorf("Unable to cleanly shutdown driver: %v", err)
195195
}
196196

197197
return nil

0 commit comments

Comments
 (0)