From 077f8ef380cb9bf1c739db723ba566aa657ac380 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 6 Feb 2023 08:52:46 +0100 Subject: [PATCH] ClusterCacheTracker: fix panic in error creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- controllers/remote/cluster_cache_tracker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/remote/cluster_cache_tracker.go b/controllers/remote/cluster_cache_tracker.go index 10550e455568..5052d19966ae 100644 --- a/controllers/remote/cluster_cache_tracker.go +++ b/controllers/remote/cluster_cache_tracker.go @@ -445,7 +445,7 @@ func (t *ClusterCacheTracker) Watch(ctx context.Context, input WatchInput) error // We have to lock the cluster, so that the watch is not created multiple times in parallel. ok := t.clusterLock.TryLock(input.Cluster) if !ok { - return errors.Wrapf(ErrClusterLocked, "failed to add %s watch on cluster %s: failed to get lock for cluster", input.Kind, klog.KRef(input.Cluster.Namespace, input.Cluster.Name)) + return errors.Wrapf(ErrClusterLocked, "failed to add %T watch on cluster %s: failed to get lock for cluster", input.Kind, klog.KRef(input.Cluster.Namespace, input.Cluster.Name)) } defer t.clusterLock.Unlock(input.Cluster)