Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR suggested changes
Signed-off-by: Iván Álvarez <[email protected]>
  • Loading branch information
ivanape committed May 27, 2024
commit 2f0deff72aad35ab890274200ed65520588313c2
2 changes: 1 addition & 1 deletion examples/fleet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func main() {
if err := client.Get(ctx, req.NamespacedName, pod); err != nil {
return reconcile.Result{}, err
}
log.Info(fmt.Sprintf("Retrieved pod %s:>%s/%s", cl.Name(), pod.Namespace, pod.Name))
log.Info("Reconciling pod", "ns", pod.GetNamespace(), "name", pod.Name, "uuid", pod.UID)

// Print any annotations that start with fleet.
for k, v := range pod.Labels {
Expand Down
1 change: 1 addition & 0 deletions pkg/manager/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ func (cm *controllerManager) Engage(ctx context.Context, cl cluster.Cluster) err
// be reentrant via noop
cm.engagedClustersLock.RLock()
if _, ok := cm.engagedClusters[cl.Name()]; ok {
cm.engagedClustersLock.RUnlock()
return nil
}
cm.engagedClustersLock.RUnlock()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great find! but don't we need both? RUnlock on return, and RUnlock for the else case?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I missed that. I have also update the fleet example with the same error here.

Expand Down