@@ -161,7 +161,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
161
161
162
162
// Implement controller logic here
163
163
machineName := m .GetName ()
164
- klog .Infof ("%v : reconciling Machine" , machineName )
164
+ klog .Infof ("%q : reconciling Machine" , machineName )
165
165
166
166
// Get the original state of conditions now so that they can be used to calculate the patch later.
167
167
// 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
229
229
// we can loose instances, e.g. right after request to create one
230
230
// was sent and before a list of node addresses was set.
231
231
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 )
233
233
return delayIfRequeueAfterError (err )
234
234
}
235
235
}
236
236
237
237
instanceExists , err := r .actuator .Exists (ctx , m )
238
238
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 )
240
240
return reconcile.Result {}, err
241
241
}
242
242
@@ -271,7 +271,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
271
271
272
272
instanceExists , err := r .actuator .Exists (ctx , m )
273
273
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 )
275
275
276
276
conditions .Set (m , conditions .UnknownCondition (
277
277
machinev1 .InstanceExistsCondition ,
@@ -289,7 +289,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
289
289
if instanceExists {
290
290
klog .Infof ("%v: reconciling machine triggers idempotent update" , machineName )
291
291
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 () )
293
293
294
294
if patchErr := r .updateStatus (ctx , m , ptr .Deref (m .Status .Phase , "" ), nil , originalConditions ); patchErr != nil {
295
295
klog .Errorf ("%v: error patching status: %v" , machineName , patchErr )
@@ -356,7 +356,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
356
356
357
357
klog .Infof ("%v: reconciling machine triggers idempotent create" , machineName )
358
358
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 )
360
360
if isInvalidMachineConfigurationError (err ) {
361
361
if err := r .updateStatus (ctx , m , machinev1 .PhaseFailed , err , originalConditions ); err != nil {
362
362
return reconcile.Result {}, err
0 commit comments