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

[BUG] Failed to start kruise-manager when CR has been created before webhook injection #48

Closed
ntboot opened this issue Jun 26, 2019 · 15 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@ntboot
Copy link

ntboot commented Jun 26, 2019

What happened:

Error deploying kruise-controller-manager
image

Environment:

  • Kruise version:
    image
@ntboot ntboot added the kind/bug Something isn't working label Jun 26, 2019
@FillZpp
Copy link
Member

FillZpp commented Jun 26, 2019

Em...Let me guess your operations:

  1. First, you applied the CRDs into your cluster.
  2. Then, you created a StatefulSet.apps.kruise.io resource.
  3. After that, you tried to install the kruise-controller-manager, and unfortunately you got an error.

Am i right?

@ntboot
Copy link
Author

ntboot commented Jun 26, 2019

  1. extend CRD
  2. then deploy kruise-manager

Reference document: https://github.com/openkruise/kruise/blob/master/docs/tutorial/kruise-install.md

@FillZpp
Copy link
Member

FillZpp commented Jun 26, 2019

@ntboot Could you show me kubectl get statefulset.apps.kruise.io

@ntboot
Copy link
Author

ntboot commented Jun 26, 2019

I don't understand why kruise-controller-manager will miss restart once my guest book is installed.

image
Uploading image.png…

@FillZpp
Copy link
Member

FillZpp commented Jun 26, 2019

@jian-he @resouer I think this is a bug of guestbook-kruise chart.

We can not put both kruise-manager and StatefulSet.apps.kruise.io resources in chart, because the manager must be started before users create the AdvancedStatefulSet. But we have no way to define the order that yamls in chart which should be applied first and others shouldn't be applied util the first one has been ready.

@ntboot
Copy link
Author

ntboot commented Jun 26, 2019

I know what you mean, you have to deploy kruise-controller-manager correctly first, and then you can't deploy the related resources of astatefulset controller correctly. But I also follow the document step by step, but still encountered the above problems.

@ntboot
Copy link
Author

ntboot commented Jun 26, 2019

I like this project very much, and I hope that the elastic expansion behind you will open up as soon as possible. So now I want to solve this problem

@resouer
Copy link
Member

resouer commented Jun 26, 2019

@FillZpp If I'm understanding it correctly, you are suggesting we should very kruise-manager is running before deploy any applications?

We can not put both kruise-manager and StatefulSet.apps.kruise.io resources in chart

kruise-manager is not part of guestbook-kruise charts, it's started separately by following https://github.com/openkruise/kruise/blob/master/docs/tutorial/kruise-install.md

@FillZpp
Copy link
Member

FillZpp commented Jun 27, 2019

@resouer Got it.

@ntboot So i think the problem is, after kruise-manager installed, you went to install guestbook chart immediately, but the kruise-manager had not been ready yet.

This could be a regular problem, i have to think of how to avoid it.

@ntboot
Copy link
Author

ntboot commented Jun 27, 2019

I guess so. I did a test waiting for kruise-manger to start for 8 minutes. Then I started an astatefuleset controller, and finally kruise-manger was restart.

@ntboot
Copy link
Author

ntboot commented Jun 27, 2019

@FillZpp

@FillZpp FillZpp changed the title [BUG] [BUG] Failed to start kruise-manager when CR has been created before webhook injection Jun 27, 2019
@FillZpp
Copy link
Member

FillZpp commented Jun 27, 2019

#50 will fix this problem.

After deployed kruise into a cluster, users can not create resources defined in kruise util kurise-manager has been started.

@ntboot
Copy link
Author

ntboot commented Jun 27, 2019

I changed a new cluster operation and succeeded! Thank you

However, the cluster that had problems before cleaned up the relevant resources, and then try again is not good. My understanding is that the order of deleting resources should be:

  1. sts. apps. kruise. IO

  2. kruise-manger

Am I right? @FillZpp

@FillZpp
Copy link
Member

FillZpp commented Jun 27, 2019

@ntboot Delete all sts.apps.kruise.io resources, then delete the pod kubectl delete pod -n kruise-system kruise-controller-manager-0.
After that, the StatefulSet named kruise-controller-manager will create a new Pod which should be Ready.

@ntboot
Copy link
Author

ntboot commented Jun 27, 2019

got it

@ntboot ntboot closed this as completed Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants