-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update pod status from leaf to root #730
base: main
Are you sure you want to change the base?
Conversation
0fe26e3
to
7de5842
Compare
pkg/clustertree/cluster-manager/controllers/node_lease_controller.go
Outdated
Show resolved
Hide resolved
// } | ||
// }) | ||
// return reconcile.Result{}, nil | ||
// } | ||
func (r *LeafPodReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the annotated code above
@@ -60,6 +60,7 @@ type ClusterController struct { | |||
ControllerManagers map[string]manager.Manager | |||
ManagerCancelFuncs map[string]*context.CancelFunc | |||
ControllerManagersLock sync.Mutex | |||
SharedPodLock sync.Mutex | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lock has some issues.
…lict Signed-off-by: gaoyuan <[email protected]>
@@ -307,6 +310,7 @@ func (c *ClusterController) setupControllers( | |||
leafPodController := podcontrollers.LeafPodReconciler{ | |||
RootClient: c.Root, | |||
Namespace: "", | |||
PodLock: &SharedPodLock, | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of the shared lock is incorrect.
What type of PR is this?
/kind feature
What does this PR do?
update pod status from leaf to root
Which issue(s) does this PR fix?
Fixes #705
Special notes for your reviewer:
Does this PR introduce a user-facing change?