@@ -163,7 +163,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
163
163
164
164
// Implement controller logic here
165
165
machineName := m .GetName ()
166
- klog .Infof ("%v : reconciling Machine" , machineName )
166
+ klog .Infof ("%q : reconciling Machine" , machineName )
167
167
168
168
// Get the original state of conditions now so that they can be used to calculate the patch later.
169
169
// This must be a copy otherwise the referenced slice will be modified by later machine conditions changes.
@@ -231,14 +231,14 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
231
231
// we can loose instances, e.g. right after request to create one
232
232
// was sent and before a list of node addresses was set.
233
233
if len (m .Status .Addresses ) > 0 || ! isInvalidMachineConfigurationError (err ) {
234
- klog .Errorf ("%v : failed to delete machine: %v" , machineName , err )
234
+ klog .Errorf ("%q : failed to delete machine: %v" , machineName , err )
235
235
return delayIfRequeueAfterError (err )
236
236
}
237
237
}
238
238
239
239
instanceExists , err := r .actuator .Exists (ctx , m )
240
240
if err != nil {
241
- klog .Errorf ("%v : failed to check if machine exists: %v" , machineName , err )
241
+ klog .Errorf ("%q : failed to check if machine exists: %v" , machineName , err )
242
242
return reconcile.Result {}, err
243
243
}
244
244
@@ -273,7 +273,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
273
273
274
274
instanceExists , err := r .actuator .Exists (ctx , m )
275
275
if err != nil {
276
- klog .Errorf ("%v : failed to check if machine exists: %v" , machineName , err )
276
+ klog .Errorf ("%q : failed to check if machine exists: %v" , machineName , err )
277
277
278
278
conditions .Set (m , conditions .UnknownCondition (
279
279
machinev1 .InstanceExistsCondition ,
@@ -291,7 +291,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
291
291
if instanceExists {
292
292
klog .Infof ("%v: reconciling machine triggers idempotent update" , machineName )
293
293
if err := r .actuator .Update (ctx , m ); err != nil {
294
- klog .Errorf ("%v : error updating machine: %v, retrying in %v seconds" , machineName , err , requeueAfter )
294
+ klog .Errorf ("%q : error updating machine: %v, retrying in %s seconds" , machineName , err , requeueAfter . String () )
295
295
296
296
if patchErr := r .updateStatus (ctx , m , ptr .Deref (m .Status .Phase , "" ), nil , originalConditions ); patchErr != nil {
297
297
klog .Errorf ("%v: error patching status: %v" , machineName , patchErr )
@@ -358,7 +358,7 @@ func (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Requ
358
358
359
359
klog .Infof ("%v: reconciling machine triggers idempotent create" , machineName )
360
360
if err := r .actuator .Create (ctx , m ); err != nil {
361
- klog .Warningf ("%v : failed to create machine: %v" , machineName , err )
361
+ klog .Warningf ("%q : failed to create machine: %v" , machineName , err )
362
362
if isInvalidMachineConfigurationError (err ) {
363
363
if err := r .updateStatus (ctx , m , machinev1 .PhaseFailed , err , originalConditions ); err != nil {
364
364
return reconcile.Result {}, err
0 commit comments