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

[DBAAS-974] fix envtest timeout waiting for process kube-apiserver to stop #287

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

tchughesiv
Copy link
Contributor

@tchughesiv tchughesiv commented Oct 31, 2022

resolves this issue -
kubernetes-sigs/controller-runtime#1571

resolves hanging processes as well

  501 41503     1   0 10:41AM ttys000    1:13.34 /Users/<user>/workspace/dbaas-operator/bin/k8s/1.24.2-darwin-arm64/etcd --advertise-client-urls=http://127.0.0.1:50533 ...
  501 41507     1   0 10:41AM ttys000    6:52.17 /Users/<user>/workspace/dbaas-operator/bin/k8s/1.24.2-darwin-arm64/kube-apiserver --allow-privileged=true ...

Signed-off-by: Tommy Hughes [email protected]

@tchughesiv tchughesiv changed the title fix envtest timeout waiting for process kube-apiserver to stop [DBAAS-974] fix envtest timeout waiting for process kube-apiserver to stop Oct 31, 2022
xieshenzh
xieshenzh previously approved these changes Nov 1, 2022
Comment on lines 167 to 171
// Set 4 with random
if err != nil {
time.Sleep(4 * time.Second)
}
err = testEnv.Stop()
Copy link
Contributor

@xieshenzh xieshenzh Nov 1, 2022

Choose a reason for hiding this comment

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

It looks fine. But I am not sure if the sleep is necessary. The kubebuilder tutorial doesn't have it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks... fixed it. the real issue was this line -

err = k8sManager.Start(ctrl.SetupSignalHandler())

@tchughesiv tchughesiv merged commit 09a5fb9 into RHEcosystemAppEng:main Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants