Skip to content

Commit 1cec8c1

Browse files
tmmorink8s-infra-cherrypick-robot
authored and
k8s-infra-cherrypick-robot
committed
OpenStackServer controller: minor log message fix
Fixes this bad error message format: I0317 13:20:19.512088 1 openstackserver_controller.go:109] "OpenStackServer %s/%s linked to a Cluster that is paused. Won't reconcile" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="OpenStackServer" OpenStackServer="sylva-system/management-cluster-cp-f7843e31d7-rbv5c" namespace="sylva-system" name="management-cluster-cp-f7843e31d7-rbv5c" reconcileID="a0e2f500-ae75-47af-bc3b-85bb9ae4b59b" sylva-system="management-cluster-cp-f7843e31d7-rbv5c" We in fact don't need the "%s/%s" and also the additional paramters aren't needed because the logger is derived from "scope" and already logging the server name and namespace.
1 parent 09e6371 commit 1cec8c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/openstackserver_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (r *OpenStackServerReconciler) Reconcile(ctx context.Context, req ctrl.Requ
106106
}
107107
if cluster != nil {
108108
if annotations.IsPaused(cluster, openStackServer) {
109-
scope.Logger().Info("OpenStackServer %s/%s linked to a Cluster that is paused. Won't reconcile", openStackServer.Namespace, openStackServer.Name)
109+
scope.Logger().Info("OpenStackServer linked to a Cluster that is paused. Won't reconcile")
110110
return reconcile.Result{}, nil
111111
}
112112
}

0 commit comments

Comments
 (0)