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

failover feature-gate Cannot be closed correctly #5375

Open
kubepopeye opened this issue Aug 15, 2024 · 14 comments
Open

failover feature-gate Cannot be closed correctly #5375

kubepopeye opened this issue Aug 15, 2024 · 14 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@kubepopeye
Copy link

Please provide an in-depth description of the question you have:

I don't want karmada to trigger a failover when the cluster is unreachable, I tried to disable the feature-gate directly in karmada-controller and found that the failover still occurs!

What do you think about this question?:
I went to look at the karmada implementation, the cluster-controller does add a judgement for failover feature-gate in the monitor place, but in the ttaintClusterByCondition method, there is a lack of judgement, which leads to the taint being hit, and ultimately leads to feature-gate failover feature-gate.

Environment:

  • Karmada version:
  • v1.8.0
  • Kubernetes version:
  • 1.25
  • Others:
@kubepopeye kubepopeye added the kind/question Indicates an issue that is a support question. label Aug 15, 2024
@whitewindmills
Copy link
Member

taintClusterByCondition only adds NoSchedule taints, which only affect scheduling.

@kubepopeye
Copy link
Author

企业微信截图_ca74a2d1-ef4f-467e-8c83-00554c41388d

@kubepopeye
Copy link
Author

So what's causing this problem and can you help answer? It's true that it's noSchedule. but it's still triggering the clearing of the orphaned work.

@whitewindmills

@whitewindmills
Copy link
Member

the orphan works may be caused by multiple reasons. I cannot find the root cause by those comments. can you paste scheduler logs here?

@kubepopeye
Copy link
Author

�scheduler logs? I found that it seems to remove the resourcebind spec cluster only in the case of taint, which ends up causing findOrphan to be able to be found there.

@whitewindmills
Copy link
Member

since you have disabled the failover feature, but karmada-scheduler might change their schduling result.

@kubepopeye
Copy link
Author

since you have disabled the failover feature, but karmada-scheduler might change their schduling result.

Is this the expected correct behaviour, I've found that in some cases it can lead to an empty list of Cluster's APIEnablements, which ends up with disastrous consequences!

@whitewindmills
Copy link
Member

no, but we're fixing it.
ref:
#5325
#5216

@whitewindmills
Copy link
Member

I've found that in some cases it can lead to an empty list of Cluster's APIEnablements, which ends up with disastrous consequences!

have u ensured that's your root cause?

@kubepopeye
Copy link
Author

I've found that in some cases it can lead to an empty list of Cluster's APIEnablements, which ends up with disastrous consequences!

have u ensured that's your root cause?

Yes, it seems to me that the shutdown of failover means that no migration of availability zones should take place, but it seems that there are some features here that cause failover-like behaviour to take place nonetheless.

@kubepopeye
Copy link
Author

kubepopeye commented Aug 16, 2024

I've found that in some cases it can lead to an empty list of Cluster's APIEnablements, which ends up with disastrous consequences!

have u ensured that's your root cause?

If we are unlucky, the cluster-status-controller will clear the apiEnablements in the cluster status when the cluster goes offline, then the scheduler will step in and find no matching APIs, which in turn will cause rb's specification cluster to be cleared, and finally the binding controller will removeOrphan, causing the Our downstream resources are removed. The binding controller's removeOrphan causes our downstream resources to be deleted. This is the complete chain, so we still consider the failover implementation to be incomplete.

@whitewindmills
Copy link
Member

first, there's nothing to do with FAILOVER.
did you see your cluster failing? it's important, wrong APIENABLEMENTS are usually caused by network errors or failing APIService.

todo:
grep such logs in your karmada-controller-manager.

  • Failed to get any APIs installed in Cluster
  • Maybe get partial
    if you find them, that's the case.

@kubepopeye
Copy link
Author

kubepopeye commented Aug 16, 2024

  • Failed to get any APIs installed in Cluster

yes,Failed to get any APIs installed in Cluster

企业微信截图_b69678f0-cbb8-4242-9a80-b414da0d8da9 image

@XiShanYongYe-Chang
Copy link
Member

Hi @kubepopeye, thanks for your response,

According to the log information, your analysis is correct, and we noticed this problem and fixed it in v1.12, just as @whitewindmills said, in terms of karmada-controller-manager, we added CompleteAPIEnablements for cluster status. On the scheduler side, we handled the cluster CompleteAPIEnablements Condition.

Now this problem should have been fixed, can you help make sure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants