Skip to content

Commit e9f163f

Browse files
prashanth26Gaurav Gupta
authored andcommitted
Improved logs and comments (#299)
- Moved frequent logs to higher log levels - Removed unwanted comment message
1 parent 6b7e1f3 commit e9f163f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

pkg/controller/deployment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ func (dc *controller) getMachineMapForMachineDeployment(d *v1alpha1.MachineDeplo
427427
// This function is not meant to be invoked concurrently with the same key.
428428
func (dc *controller) reconcileClusterMachineDeployment(key string) error {
429429
startTime := time.Now()
430-
glog.V(3).Infof("Started syncing deployment %q (%v)", key, startTime)
430+
glog.V(4).Infof("Started syncing machine deployment %q (%v)", key, startTime)
431431
defer func() {
432-
glog.V(3).Infof("Finished syncing deployment %q (%v)", key, time.Since(startTime))
432+
glog.V(4).Infof("Finished syncing machine deployment %q (%v)", key, time.Since(startTime))
433433
}()
434434

435435
_, name, err := cache.SplitMetaNamespaceKey(key)

pkg/controller/machine.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ func (c *controller) reconcileClusterMachineKey(key string) error {
109109
}
110110

111111
func (c *controller) reconcileClusterMachine(machine *v1alpha1.Machine) error {
112-
glog.V(3).Info("Start Reconciling machine: ", machine.Name)
112+
glog.V(4).Info("Start Reconciling machine: ", machine.Name)
113113
defer func() {
114114
c.enqueueMachineAfter(machine, 10*time.Minute)
115-
glog.V(3).Info("Stop Reconciling machine: ", machine.Name)
115+
glog.V(4).Info("Stop Reconciling machine: ", machine.Name)
116116
}()
117117

118118
if c.safetyOptions.MachineControllerFrozen && machine.DeletionTimestamp == nil {
@@ -222,7 +222,7 @@ func (c *controller) addNodeToMachine(obj interface{}) {
222222
return
223223
}
224224

225-
glog.V(3).Infof("Add machine object backing node %q", machine.Name)
225+
glog.V(4).Infof("Add machine object backing node %q", machine.Name)
226226
c.enqueueMachine(machine)
227227
}
228228

@@ -506,7 +506,7 @@ func (c *controller) machineDelete(machine *v1alpha1.Machine, driver driver.Driv
506506
nodeName := machine.Status.Node
507507
drainOptions := NewDrainOptions(
508508
c.targetCoreClient,
509-
timeOutDuration, // TODO: Need to remove this
509+
timeOutDuration,
510510
maxEvictRetries,
511511
pvDetachTimeOut,
512512
nodeName,

pkg/controller/machineset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ func (c *controller) manageReplicas(allMachines []*v1alpha1.Machine, machineSet
430430
// invoked concurrently with the same key.
431431
func (c *controller) reconcileClusterMachineSet(key string) error {
432432
startTime := time.Now()
433-
glog.V(3).Infof("Start syncing %q", key)
433+
glog.V(4).Infof("Start syncing machine set %q", key)
434434
defer func() {
435-
glog.V(3).Infof("Finished syncing %q (%v)", key, time.Since(startTime))
435+
glog.V(4).Infof("Finished syncing machine set %q (%v)", key, time.Since(startTime))
436436
}()
437437

438438
_, name, err := cache.SplitMetaNamespaceKey(key)

0 commit comments

Comments
 (0)