@@ -161,7 +161,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
161161
162162 // Implement controller logic here
163163 machineName := m .GetName ()
164- klog .Infof ("%v : reconciling Machine" , machineName )
164+ klog .Infof ("%q : reconciling Machine" , machineName )
165165
166166 // Get the original state of conditions now so that they can be used to calculate the patch later.
167167 // This must be a copy otherwise the referenced slice will be modified by later machine conditions changes.
@@ -229,14 +229,14 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
229229 // we can loose instances, e.g. right after request to create one
230230 // was sent and before a list of node addresses was set.
231231 if len (m .Status .Addresses ) > 0 || ! isInvalidMachineConfigurationError (err ) {
232- klog .Errorf ("%v : failed to delete machine: %v" , machineName , err )
232+ klog .Errorf ("%q : failed to delete machine: %v" , machineName , err )
233233 return delayIfRequeueAfterError (err )
234234 }
235235 }
236236
237237 instanceExists , err := r .actuator .Exists (ctx , m )
238238 if err != nil {
239- klog .Errorf ("%v : failed to check if machine exists: %v" , machineName , err )
239+ klog .Errorf ("%q : failed to check if machine exists: %v" , machineName , err )
240240 return reconcile.Result {}, err
241241 }
242242
@@ -271,7 +271,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
271271
272272 instanceExists , err := r .actuator .Exists (ctx , m )
273273 if err != nil {
274- klog .Errorf ("%v : failed to check if machine exists: %v" , machineName , err )
274+ klog .Errorf ("%q : failed to check if machine exists: %v" , machineName , err )
275275
276276 conditions .Set (m , conditions .UnknownCondition (
277277 machinev1 .InstanceExistsCondition ,
@@ -289,7 +289,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
289289 if instanceExists {
290290 klog .Infof ("%v: reconciling machine triggers idempotent update" , machineName )
291291 if err := r .actuator .Update (ctx , m ); err != nil {
292- klog .Errorf ("%v : error updating machine: %v, retrying in %v seconds" , machineName , err , requeueAfter )
292+ klog .Errorf ("%q : error updating machine: %v, retrying in %s seconds" , machineName , err , requeueAfter . String () )
293293
294294 if patchErr := r .updateStatus (ctx , m , ptr .Deref (m .Status .Phase , "" ), nil , originalConditions ); patchErr != nil {
295295 klog .Errorf ("%v: error patching status: %v" , machineName , patchErr )
@@ -356,7 +356,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
356356
357357 klog .Infof ("%v: reconciling machine triggers idempotent create" , machineName )
358358 if err := r .actuator .Create (ctx , m ); err != nil {
359- klog .Warningf ("%v : failed to create machine: %v" , machineName , err )
359+ klog .Warningf ("%q : failed to create machine: %v" , machineName , err )
360360 if isInvalidMachineConfigurationError (err ) {
361361 if err := r .updateStatus (ctx , m , machinev1 .PhaseFailed , err , originalConditions ); err != nil {
362362 return reconcile.Result {}, err
0 commit comments