Skip to content

Commit f1c473e

Browse files
committed
Capitalize all log messages for consistency
Signed-off-by: Nour <[email protected]>
1 parent 23d205f commit f1c473e

File tree

22 files changed

+61
-61
lines changed

22 files changed

+61
-61
lines changed

cmd/compute-domain-controller/cleanup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (m *CleanupManager[T]) cleanup(ctx context.Context) {
115115

116116
computeDomain, err := m.getComputeDomain(uid)
117117
if err != nil {
118-
klog.Errorf("error getting ComputeDomain: %v", err)
118+
klog.Errorf("Error getting ComputeDomain: %v", err)
119119
continue
120120
}
121121

@@ -125,7 +125,7 @@ func (m *CleanupManager[T]) cleanup(ctx context.Context) {
125125

126126
klog.Infof("Cleanup: stale %T found for ComputeDomain '%s', running callback", *new(T), uid)
127127
if err := m.callback(ctx, uid); err != nil {
128-
klog.Errorf("error running CleanupManager callback: %v", err)
128+
klog.Errorf("Error running CleanupManager callback: %v", err)
129129
continue
130130
}
131131
}

cmd/compute-domain-controller/computedomain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (m *ComputeDomainManager) Start(ctx context.Context) (rerr error) {
9393
defer func() {
9494
if rerr != nil {
9595
if err := m.Stop(); err != nil {
96-
klog.Errorf("error stopping ComputeDomain manager: %v", err)
96+
klog.Errorf("Error stopping ComputeDomain manager: %v", err)
9797
}
9898
}
9999
}()

cmd/compute-domain-controller/daemonset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (m *DaemonSetManager) Start(ctx context.Context) (rerr error) {
112112
defer func() {
113113
if rerr != nil {
114114
if err := m.Stop(); err != nil {
115-
klog.Errorf("error stopping DaemonSet manager: %v", err)
115+
klog.Errorf("Error stopping DaemonSet manager: %v", err)
116116
}
117117
}
118118
}()

cmd/compute-domain-controller/daemonsetpods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func (m *DaemonSetPodManager) Start(ctx context.Context) (rerr error) {
103103
defer func() {
104104
if rerr != nil {
105105
if err := m.Stop(); err != nil {
106-
klog.Errorf("error stopping DaemonSetPod manager: %v", err)
106+
klog.Errorf("Error stopping DaemonSetPod manager: %v", err)
107107
}
108108
}
109109
}()

cmd/compute-domain-controller/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (m *NodeManager) Start(ctx context.Context) (rerr error) {
7575
defer func() {
7676
if rerr != nil {
7777
if err := m.Stop(); err != nil {
78-
klog.Errorf("error stopping Node manager: %v", err)
78+
klog.Errorf("Error stopping Node manager: %v", err)
7979
}
8080
}
8181
}()

cmd/compute-domain-controller/resourceclaimtemplate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (m *BaseResourceClaimTemplateManager) Start(ctx context.Context) (rerr erro
115115
defer func() {
116116
if rerr != nil {
117117
if err := m.Stop(); err != nil {
118-
klog.Errorf("error stopping ResourceClaimTemplate manager: %v", err)
118+
klog.Errorf("Error stopping ResourceClaimTemplate manager: %v", err)
119119
}
120120
}
121121
}()

cmd/compute-domain-daemon/computedomain.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (m *ComputeDomainManager) Start(ctx context.Context) (rerr error) {
9090
defer func() {
9191
if rerr != nil {
9292
if err := m.Stop(); err != nil {
93-
klog.Errorf("error stopping ComputeDomainManager: %v", err)
93+
klog.Errorf("Error stopping ComputeDomainManager: %v", err)
9494
}
9595
}
9696
}()
@@ -333,7 +333,7 @@ func (m *ComputeDomainManager) MaybePushNodesUpdate(cd *nvapi.ComputeDomain) {
333333
// wait for all 'numNodes' nodes to show up before sending an update.
334334
if !featuregates.Enabled(featuregates.IMEXDaemonsWithDNSNames) {
335335
if len(cd.Status.Nodes) != cd.Spec.NumNodes {
336-
klog.Infof("numNodes: %d, nodes seen: %d", cd.Spec.NumNodes, len(cd.Status.Nodes))
336+
klog.Infof("NumNodes: %d, nodes seen: %d", cd.Spec.NumNodes, len(cd.Status.Nodes))
337337
return
338338
}
339339
}

cmd/compute-domain-daemon/main.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func run(ctx context.Context, cancel context.CancelFunc, flags *Flags) error {
205205
podNamespace: flags.podNamespace,
206206
maxNodesPerIMEXDomain: flags.maxNodesPerIMEXDomain,
207207
}
208-
klog.Infof("config: %v", config)
208+
klog.Infof("Config: %v", config)
209209

210210
// Write the IMEX config with the current pod IP before starting the daemon
211211
if err := writeIMEXConfig(flags.podIP); err != nil {
@@ -241,7 +241,7 @@ func run(ctx context.Context, cancel context.CancelFunc, flags *Flags) error {
241241
go func() {
242242
defer wg.Done()
243243
if err := controller.Run(ctx); err != nil {
244-
klog.Errorf("controller failed, initiate shutdown: %s", err)
244+
klog.Errorf("Controller failed, initiate shutdown: %s", err)
245245
cancel()
246246
}
247247
klog.Infof("Terminated: controller task")
@@ -275,7 +275,7 @@ func run(ctx context.Context, cancel context.CancelFunc, flags *Flags) error {
275275
// Watchdog restarts the IMEX daemon upon unexpected termination, and
276276
// shuts it down gracefully upon our own shutdown.
277277
if err := processManager.Watchdog(ctx); err != nil {
278-
klog.Errorf("watch failed, initiate shutdown: %s", err)
278+
klog.Errorf("Watch failed, initiate shutdown: %s", err)
279279
cancel()
280280
}
281281
klog.Infof("Terminated: process manager")
@@ -292,10 +292,10 @@ func run(ctx context.Context, cancel context.CancelFunc, flags *Flags) error {
292292
// IMEX daemon nodes config file and (re)starting the IMEX daemon process.
293293
func IMEXDaemonUpdateLoopWithIPs(ctx context.Context, controller *Controller, cliqueID string, pm *ProcessManager) error {
294294
for {
295-
klog.Infof("wait for nodes update")
295+
klog.Infof("Wait for nodes update")
296296
select {
297297
case <-ctx.Done():
298-
klog.Infof("shutdown: stop IMEXDaemonUpdateLoopWithIPs")
298+
klog.Infof("Shutdown: stop IMEXDaemonUpdateLoopWithIPs")
299299
return nil
300300
case nodes := <-controller.GetNodesUpdateChan():
301301
if err := writeNodesConfig(cliqueID, nodes); err != nil {
@@ -320,10 +320,10 @@ func IMEXDaemonUpdateLoopWithIPs(ctx context.Context, controller *Controller, cl
320320
// unexpectedly and expectedly).
321321
func IMEXDaemonUpdateLoopWithDNSNames(ctx context.Context, controller *Controller, processManager *ProcessManager, dnsNameManager *DNSNameManager) error {
322322
for {
323-
klog.Infof("wait for nodes update")
323+
klog.Infof("Wait for nodes update")
324324
select {
325325
case <-ctx.Done():
326-
klog.Infof("shutdown: stop IMEXDaemonUpdateLoopWithDNSNames")
326+
klog.Infof("Shutdown: stop IMEXDaemonUpdateLoopWithDNSNames")
327327
return nil
328328
case nodes := <-controller.GetNodesUpdateChan():
329329
updated, err := dnsNameManager.UpdateDNSNameMappings(nodes)
@@ -349,13 +349,13 @@ func IMEXDaemonUpdateLoopWithDNSNames(ctx context.Context, controller *Controlle
349349

350350
// Actively ask the IMEX daemon to re-read its config and to
351351
// re-connect to its peers (involving DNS name re-resolution).
352-
klog.Infof("updated DNS/IP mapping, old process: send SIGUSR1")
352+
klog.Infof("Updated DNS/IP mapping, old process: send SIGUSR1")
353353
if err := processManager.Signal(syscall.SIGUSR1); err != nil {
354354
// Only log (ignore this error for now: if the process went away
355355
// unexpectedly, the process manager will handle that. If any
356356
// other error resulted in bad signal delivery, we may get away
357357
// with it).
358-
klog.Errorf("failed to send SIGUSR1 to child process: %s", err)
358+
klog.Errorf("Failed to send SIGUSR1 to child process: %s", err)
359359
}
360360
}
361361
}

cmd/compute-domain-kubelet-plugin/cdi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (cdi *CDIHandler) CreateStandardDeviceSpecFile(allocatable AllocatableDevic
146146
}
147147
defer func() {
148148
if r := cdi.nvml.Shutdown(); r != nvml.SUCCESS {
149-
klog.Warningf("failed to shutdown NVML: %v", r)
149+
klog.Warningf("Failed to shutdown NVML: %v", r)
150150
}
151151
}()
152152

cmd/compute-domain-kubelet-plugin/computedomain.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (m *ComputeDomainManager) Start(ctx context.Context) (rerr error) {
8989
defer func() {
9090
if rerr != nil {
9191
if err := m.Stop(); err != nil {
92-
klog.Errorf("error stopping ComputeDomainManager: %v", err)
92+
klog.Errorf("Error stopping ComputeDomainManager: %v", err)
9393
}
9494
}
9595
}()
@@ -366,13 +366,13 @@ func (m *ComputeDomainManager) periodicCleanup(ctx context.Context) {
366366
continue
367367
}
368368
if err != nil {
369-
klog.Errorf("error checking for existence of directory '%s': %v", m.configFilesRoot, err)
369+
klog.Errorf("Error checking for existence of directory '%s': %v", m.configFilesRoot, err)
370370
continue
371371
}
372372

373373
entries, err := os.ReadDir(m.configFilesRoot)
374374
if err != nil {
375-
klog.Errorf("error reading entries under directory '%s': %v", m.configFilesRoot, err)
375+
klog.Errorf("Error reading entries under directory '%s': %v", m.configFilesRoot, err)
376376
continue
377377
}
378378

@@ -387,7 +387,7 @@ func (m *ComputeDomainManager) periodicCleanup(ctx context.Context) {
387387

388388
computeDomain, err := m.GetComputeDomain(ctx, uid)
389389
if err != nil {
390-
klog.Errorf("error getting ComputeDomain: %v", err)
390+
klog.Errorf("Error getting ComputeDomain: %v", err)
391391
continue
392392
}
393393

@@ -399,7 +399,7 @@ func (m *ComputeDomainManager) periodicCleanup(ctx context.Context) {
399399
klog.V(6).Infof("Stale directory found for ComputeDomain '%s', running cleanup", uid)
400400

401401
if err := os.RemoveAll(path); err != nil {
402-
klog.Errorf("error removing artifacts directory for ComputeDomain '%s': %v", uid, err)
402+
klog.Errorf("Error removing artifacts directory for ComputeDomain '%s': %v", uid, err)
403403
continue
404404
}
405405
}

0 commit comments

Comments
 (0)