Skip to content
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

🌱 enable leader election of klusterlet-agent on single node managed cluster #695

Conversation

haoqing0110
Copy link
Member

@haoqing0110 haoqing0110 commented Nov 12, 2024

Summary

The leader election of the klusterlet-agent is disabled on the single node managed cluster to speed up the restart procedure (open-cluster-management-io/registration-operator#193). While it might cause that two pods with different configuration, such as images or bootstrap config, running at the same time. Some unexpected behavior happens in this situation, for example, when old and new agents both exist, they override hub-kubeconfig-secret with different value and trigger each other create csr constantly.

To fix those issues, it is necessary to enable the leader election of the klusterlet-agent on the single node managed cluster.

Related issue(s)

Fixes #

@openshift-ci openshift-ci bot requested review from deads2k and jnpacker November 12, 2024 08:48
@haoqing0110 haoqing0110 force-pushed the br_agent-leader-election branch from 275a62f to c0fa479 Compare November 13, 2024 07:04
@haoqing0110 haoqing0110 changed the title 🐛 enable leader election of klusterlet-agent on single node managed cluster 🌱 enable leader election of klusterlet-agent on single node managed cluster Nov 13, 2024
@haoqing0110 haoqing0110 force-pushed the br_agent-leader-election branch from c0fa479 to 1d6e452 Compare November 13, 2024 08:04
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.37%. Comparing base (67b4f1a) to head (81e8c59).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #695   +/-   ##
=======================================
  Coverage   63.37%   63.37%           
=======================================
  Files         185      185           
  Lines       17765    17765           
=======================================
  Hits        11258    11258           
+ Misses       5577     5576    -1     
- Partials      930      931    +1     
Flag Coverage Δ
unit 63.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haoqing0110 haoqing0110 force-pushed the br_agent-leader-election branch from 1d6e452 to 39b75b5 Compare November 13, 2024 08:33
…sters

Signed-off-by: Qing Hao <qhao@redhat.com>
@haoqing0110 haoqing0110 force-pushed the br_agent-leader-election branch from 39b75b5 to 81e8c59 Compare November 13, 2024 09:25
@haoqing0110
Copy link
Member Author

/assign @elgnay @qiujian16

@elgnay
Copy link
Contributor

elgnay commented Nov 14, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 14, 2024
@qiujian16
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Nov 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, qiujian16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 8544ff1 into open-cluster-management-io:main Nov 15, 2024
15 checks passed
@haoqing0110 haoqing0110 deleted the br_agent-leader-election branch November 15, 2024 02:47
xuezhaojun added a commit to xuezhaojun/OCM that referenced this pull request Nov 19, 2024
…aged clusters (open-cluster-management-io#695)"

This reverts commit 8544ff1.

Signed-off-by: xuezhaojun <zxue@redhat.com>
openshift-merge-bot bot pushed a commit that referenced this pull request Nov 20, 2024
…aged clusters (#695)" (#708)

This reverts commit 8544ff1.

Signed-off-by: xuezhaojun <zxue@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants