Skip to content

Cleanup goroutine management - #4243

Merged
jetstack-bot merged 9 commits into
cert-manager:masterfrom
inteon:improved_go_routines
Jul 28, 2021
Merged

jetstack-bot merged 9 commits into
cert-manager:masterfrom
inteon:improved_go_routines

Conversation

@inteon

@inteon inteon commented Jul 22, 2021 •

Copy link
Copy Markdown
Member

What this PR does / why we need it:
In the cert-manager repo, a lot of different methods are utilized for managing go routines.
Some of them do not properly wait for the goroutine to finish before exiting the program.
This might cause some logic to not run or only run sometimes.

This PR also cleans up the "management of goroutines", mostly by introducing "errgroup".

Release note:

the controllers now exit more cleanly (eg. the Leader Election Lease is freed properly on shutdown)

/kind cleanup

@jetstack-bot jetstack-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. area/acme Indicates a PR directly modifies the ACME Issuer code area/monitoring Indicates a PR or issue relates to monitoring area/testing Issues relating to testing labels Jul 22, 2021
@jetstack-bot

Copy link
Copy Markdown
Contributor

Hi @inteon. Thanks for your PR.

I'm waiting for a jetstack or cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jetstack-bot jetstack-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 22, 2021
@irbekrm

irbekrm commented Jul 22, 2021

Copy link
Copy Markdown
Contributor

/ok-to-test

@jetstack-bot jetstack-bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 22, 2021
@inteon
inteon force-pushed the improved_go_routines branch 4 times, most recently from 9d162ab to c49bb11 Compare July 23, 2021 07:47
@inteon inteon mentioned this pull request Jul 23, 2021

@SgtCoDFish SgtCoDFish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've not done a full review, but found a couple of typos 👍

Comment thread pkg/webhook/server/server.go Resolved
Comment thread pkg/webhook/server/server.go Resolved
@inteon
inteon force-pushed the improved_go_routines branch from c49bb11 to 75915fd Compare July 23, 2021 09:53
@inteon
inteon force-pushed the improved_go_routines branch from 75915fd to 632459c Compare July 23, 2021 13:41
Comment thread cmd/controller/app/controller.go Resolved
Comment thread pkg/controller/controller.go Resolved

@wallrj wallrj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@inteon

I tried running the controller locally on my laptop to see how it would exit after ctrl-c.

richard   improved_go_routines  ~  projects  cert-manager  cert-manager  bazel-bin/cmd/controller/controller_/controller --kubeconfig ~/.kube/config
I0727 17:57:43.504762  886925 controller.go:81] cert-manager/controller "msg"="enabled controllers: [certificaterequests-approver certificaterequests-issuer-acme certificaterequests-issuer-ca certificaterequests-issuer-selfsigned certificaterequests-issuer-vault certificaterequests-issuer-venafi certificates-issuing certificates-key-manager certificates-metrics certificates-readiness certificates-request-manager certificates-revision-manager certificates-trigger challenges clusterissuers ingress-shim issuers orders]"  
I0727 17:57:43.505747  886925 leaderelection.go:243] attempting to acquire leader lease kube-system/cert-manager-controller...
I0727 17:57:43.541148  886925 leaderelection.go:253] successfully acquired lease kube-system/cert-manager-controller
E0727 17:57:43.645834  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Certificate: failed to list *v1.Certificate: the server could not find the requested resource (get certificates.cert-manager.io)
E0727 17:57:43.645838  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.CertificateRequest: failed to list *v1.CertificateRequest: the server could not find the requested resource (get certificaterequests.cert-manager.io)
E0727 17:57:43.645919  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.ClusterIssuer: failed to list *v1.ClusterIssuer: the server could not find the requested resource (get clusterissuers.cert-manager.io)
E0727 17:57:43.645991  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Challenge: failed to list *v1.Challenge: the server could not find the requested resource (get challenges.acme.cert-manager.io)
E0727 17:57:43.646043  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Issuer: failed to list *v1.Issuer: the server could not find the requested resource (get issuers.cert-manager.io)
W0727 17:57:43.646124  886925 warnings.go:70] networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
E0727 17:57:43.646225  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Order: failed to list *v1.Order: the server could not find the requested resource (get orders.acme.cert-manager.io)
W0727 17:57:43.651424  886925 warnings.go:70] networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
E0727 17:57:44.689568  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Issuer: failed to list *v1.Issuer: the server could not find the requested resource (get issuers.cert-manager.io)
E0727 17:57:44.690006  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.ClusterIssuer: failed to list *v1.ClusterIssuer: the server could not find the requested resource (get clusterissuers.cert-manager.io)
E0727 17:57:44.840039  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Challenge: failed to list *v1.Challenge: the server could not find the requested resource (get challenges.acme.cert-manager.io)
E0727 17:57:44.914405  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Certificate: failed to list *v1.Certificate: the server could not find the requested resource (get certificates.cert-manager.io)
E0727 17:57:45.174561  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.CertificateRequest: failed to list *v1.CertificateRequest: the server could not find the requested resource (get certificaterequests.cert-manager.io)
E0727 17:57:45.221546  886925 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Order: failed to list *v1.Order: the server could not find the requested resource (get orders.acme.cert-manager.io)
^CI0727 17:57:46.131476  886925 controller.go:347] cert-manager/controller/leader-election "msg"="leader election lost"  
 richard   improved_go_routines  ~  projects  cert-manager  cert-manager  1  echo $?
1

I expected it to exit with 0 because it's configured with the Graceful error handling option. What do you expect?

@inteon

inteon commented Jul 27, 2021

Copy link
Copy Markdown
Member Author

bazel-bin/cmd/controller/controller_/controller --kubeconfig ~/.kube/config

The OnStoppedLeading is called when canceling the context. This causes an os.Exit(1): https://github.com/jetstack/cert-manager/blob/ed38011aa2c28550231b14b563c76580909e2387/cmd/controller/app/controller.go#L326-L327.

We should probably check if the context is canceled when the function is called, and only exit if it is not canceled.

@jetstack-bot jetstack-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 27, 2021
@inteon

inteon commented Jul 27, 2021 •

Copy link
Copy Markdown
Member Author

UPDATE: I did some more refactoring in controller.go and cainjector/app/start.go.
Now the leader election is freed when canceling the context, this greatly reduces startup times and probably will help a lot of users by reducing the startup/ restart time!!

You can compare this locally (master vs this PR-branch):

bazel run //cmd/controller:controller -- --kubeconfig ~/.kube/config
# ctrl+c -> cancel context
bazel run //cmd/controller:controller -- --kubeconfig ~/.kube/config
# on master there will now be a long leader election conflict, on this PR-branch; leader election should be instantaneous

@maelvls

maelvls commented Jul 27, 2021

Copy link
Copy Markdown
Member

Excellent addition!! I always had to wait for 10-20 seconds for the leader election to time out when restarting the pod... Now I won't have to wait 🙏🙏

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 27, 2021
Comment thread cmd/acmesolver/app/app.go Resolved
Comment thread cmd/acmesolver/app/app.go Resolved
Comment thread cmd/cainjector/app/start.go Resolved
Comment thread cmd/cainjector/app/start.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved

@wallrj wallrj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @inteon

There's quite a lot to absorb in this PR and I found the diff quite difficult to read...it's difficult for me to be sure that we're not changing any important behaviour with all these changes.

Is there any danger of deadlocks, while waiting for all these goroutines to exit? And if there were a deadlock after the leaderelection lock had been released, is there a danger that users (who have scaled up the default deployments) might end up with multiple cert-manager controllers competing to reconcile the same CRs? How bad would that be?

It'd be nice if you could add some comments to the code explaining what precautions you've taken to ensure that the ReleaseOnCancel will only happen after all the other goroutines have exited.

Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Outdated
ctx.Metrics.Shutdown(metricsServer)
os.Exit(0)
select {
case <-rootCtx.Done(): // Exit early if the Elected channel gets closed because we are shutting down.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
case <-rootCtx.Done(): // Exit early if the Elected channel gets closed because we are shutting down.
case <-rootCtx.Done(): // Exit early if we are shutting down or if any of the preceding goroutines have exited with failure.

That makes me think that the errgroup thing isn't quite right....because what we want is for all the goroutines to exit if any of them exit (not just those that exit with an error). So should we consider making them all exit with a error of some kind? Do you know what I mean?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

https://pkg.go.dev/golang.org/x/sync/errgroup#Group.Wait
"Wait blocks until all function calls from the Go method have returned, then returns the first non-nil error (if any) from them."
The errgroup will wait for all goroutines to return, not just those that returned an error. But in case an error is returned, the linked context will be canceled. If the context is canceled (either because of an error or a interrupt signal), we want all goroutines to return -> this is something we have to check for ourselves in our goroutine's implementation by passing the errgroup context & adding them to all select cases.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, but I was thinking of the case where one of the goroutines exits early with nil.....for some reason.
Perhaps if I examined the code, I'd see that that can't ever happen, but nevertheless, the expectation is that all the goroutines are running, otherwise cert-manager will not be functioning properly.

So ideally, we'd use something like errgroup, but where the exit of one goroutine (with error or nil) would immediatly cancel the group context so that the other goroutines can also exit cleanly.

If you agree with my logic, I don't propose that it should be done in this PR, but perhaps it should be considered for a future PR.

Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread cmd/controller/app/controller.go Resolved
Comment thread pkg/controller/controller.go Resolved
@inteon

inteon commented Jul 28, 2021 •

Copy link
Copy Markdown
Member Author

Thanks @inteon

There's quite a lot to absorb in this PR and I found the diff quite difficult to read...it's difficult for me to be sure that we're not changing any important behaviour with all these changes.

Is there any danger of deadlocks, while waiting for all these goroutines to exit? And if there were a deadlock after the leaderelection lock had been released, is there a danger that users (who have scaled up the default deployments) might end up with multiple cert-manager controllers competing to reconcile the same CRs? How bad would that be?

It'd be nice if you could add some comments to the code explaining what precautions you've taken to ensure that the ReleaseOnCancel will only happen after all the other goroutines have exited.

If the main context is canceled (= the stopChannel is closed), this will cause all sub-contexts to also be canceled.
Client-go wants us to provide a context when doing Update/ Get/ ... so these calls will not be possible after the context is canceled. Only if the wrong context is used (eg. context.TODO() or context.Background()) this could cause for some logic to keep running after the main/ root context got canceled.

eg.: The Leader Election Logic itself has to use a context.TODO() to update the leases, because the context it was using before got canceled: https://github.com/kubernetes/client-go/blob/4841142cdc4ba44627994f8c25da76c2be2cdb5d/tools/leaderelection/leaderelection.go#L294-L312

I did not add any other logic to make sure that all goroutines have exited. I don't think it is necessary to do that yet.

@wallrj wallrj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for sorting all this out @inteon

It looks fine to me.

bazel run //cmd/controller -- --kubeconfig ~/.kube/config -v 2
INFO: Analyzed target //cmd/controller:controller (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //cmd/controller:controller up-to-date:
  bazel-bin/cmd/controller/controller_/controller
INFO: Elapsed time: 0.291s, Critical Path: 0.08s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
I0728 15:32:49.220335 1000596 start.go:75] cert-manager "msg"="starting controller"  "git-commit"="{STABLE_BUILD_GIT_COMMIT}" "version"="{STABLE_DOCKER_TAG}"
I0728 15:32:49.224991 1000596 controller.go:259] cert-manager/controller/build-context "msg"="configured acme dns01 nameservers" "nameservers"=["127.0.0.53:53"] 
I0728 15:32:49.225794 1000596 controller.go:84] cert-manager/controller "msg"="enabled controllers: [certificaterequests-approver certificaterequests-issuer-acme certificaterequests-issuer-ca certificaterequests-issuer-selfsigned certificaterequests-issuer-vault certificaterequests-issuer-venafi certificates-issuing certificates-key-manager certificates-metrics certificates-readiness certificates-request-manager certificates-revision-manager certificates-trigger challenges clusterissuers ingress-shim issuers orders]"  
I0728 15:32:49.226153 1000596 controller.go:114] cert-manager/controller "msg"="starting leader election"  
I0728 15:32:49.226210 1000596 controller.go:104] cert-manager/controller "msg"="starting metrics server"  "address"={"IP":"::","Port":9402,"Zone":""}
I0728 15:32:49.226551 1000596 leaderelection.go:243] attempting to acquire leader lease kube-system/cert-manager-controller...
I0728 15:32:49.343855 1000596 leaderelection.go:253] successfully acquired lease kube-system/cert-manager-controller
I0728 15:32:49.344073 1000596 controller.go:162] cert-manager/controller "msg"="not starting controller as it's disabled" "controller"="gateway-shim" 
I0728 15:32:49.344403 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificaterequests-issuer-acme" 
I0728 15:32:49.344589 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificaterequests-issuer-vault" 
I0728 15:32:49.344589 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificaterequests-issuer-selfsigned" 
I0728 15:32:49.344755 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-issuing" 
I0728 15:32:49.344821 1000596 controller.go:162] cert-manager/controller "msg"="not starting controller as it's disabled" "controller"="certificatesigningrequests-issuer-vault" 
I0728 15:32:49.344869 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-key-manager" 
I0728 15:32:49.345010 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="issuers" 
I0728 15:32:49.345069 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="orders" 
I0728 15:32:49.345098 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="ingress-shim" 
I0728 15:32:49.345163 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificaterequests-issuer-venafi" 
I0728 15:32:49.345105 1000596 controller.go:162] cert-manager/controller "msg"="not starting controller as it's disabled" "controller"="certificatesigningrequests-issuer-ca" 
I0728 15:32:49.345281 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificaterequests-approver" 
I0728 15:32:49.345298 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-readiness" 
I0728 15:32:49.345371 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-request-manager" 
I0728 15:32:49.345415 1000596 controller.go:162] cert-manager/controller "msg"="not starting controller as it's disabled" "controller"="certificatesigningrequests-issuer-selfsigned" 
I0728 15:32:49.345441 1000596 controller.go:162] cert-manager/controller "msg"="not starting controller as it's disabled" "controller"="certificatesigningrequests-issuer-venafi" 
I0728 15:32:49.345462 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-trigger" 
I0728 15:32:49.345421 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-revision-manager" 
I0728 15:32:49.446780 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="challenges" 
I0728 15:32:49.446877 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificaterequests-issuer-ca" 
I0728 15:32:49.446972 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="certificates-metrics" 
I0728 15:32:49.447062 1000596 controller.go:185] cert-manager/controller "msg"="starting controller" "controller"="clusterissuers" 
W0728 15:32:49.451647 1000596 warnings.go:70] networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
W0728 15:32:49.462963 1000596 warnings.go:70] networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
q
^CI0728 15:32:59.014775 1000596 controller.go:126] cert-manager/controller/certificates-revision-manager "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014846 1000596 controller.go:126] cert-manager/controller/certificates-readiness "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014865 1000596 controller.go:126] cert-manager/controller/certificaterequests-issuer-vault "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014888 1000596 controller.go:126] cert-manager/controller/certificates-issuing "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014901 1000596 controller.go:126] cert-manager/controller/clusterissuers "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014915 1000596 controller.go:126] cert-manager/controller/certificaterequests-issuer-selfsigned "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014928 1000596 controller.go:126] cert-manager/controller/ingress-shim "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014816 1000596 controller.go:126] cert-manager/controller/certificaterequests-issuer-acme "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014956 1000596 controller.go:126] cert-manager/controller/certificaterequests-approver "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014965 1000596 controller.go:126] cert-manager/controller/certificates-key-manager "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014972 1000596 controller.go:126] cert-manager/controller/challenges "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014860 1000596 controller.go:126] cert-manager/controller/orders "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014903 1000596 controller.go:126] cert-manager/controller/issuers "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014822 1000596 controller.go:126] cert-manager/controller/certificates-trigger "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014816 1000596 controller.go:126] cert-manager/controller/certificaterequests-issuer-venafi "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.015018 1000596 controller.go:126] cert-manager/controller/certificates-metrics "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014931 1000596 controller.go:126] cert-manager/controller/certificates-request-manager "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.014948 1000596 controller.go:126] cert-manager/controller/certificaterequests-issuer-ca "msg"="shutting down queue as workqueue signaled shutdown"  
I0728 15:32:59.029572 1000596 controller.go:202] cert-manager/controller "msg"="control loops exited"  

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2021
@jetstack-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon, wallrj

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

The pull request process is described here

Details 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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2021
@jetstack-bot
jetstack-bot merged commit d062176 into cert-manager:master Jul 28, 2021
@jetstack-bot jetstack-bot added this to the v1.5 milestone Jul 28, 2021
@inteon
inteon deleted the improved_go_routines branch July 28, 2021 14:48
@yanxingponyai

yanxingponyai commented Aug 11, 2021 •

Copy link
Copy Markdown

@wallrj could you cherry pick this pr in the 1.4 release?

We faced an issue that the cainjector hung before the it got elected, if the manager stops with error. This issue might be related to this pr after investigating.

@wallrj

wallrj commented Aug 11, 2021

Copy link
Copy Markdown
Member

@wallrj could you cherry pick this pr in the 1.4 release?
We faced an issue that the cainjector hung before the it got elected. This issue might be related to this pr after investigating.

@yanxingponyai We're releasing cert-manager 1.5 today, which will include this code. Will you be able to use that? Or at least test the 1.5 release to find out if it does indeed solve your issue. Then we might consider backporting it to 1.4.

@munnerz

munnerz commented Aug 11, 2021

Copy link
Copy Markdown
Member

Then we might consider backporting it to 1.4.

Given the size of this patch, I'd be reluctant to see this back-ported into a patch release for risk of causing issues if there are any edge cases we have not caught...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/acme Indicates a PR directly modifies the ACME Issuer code area/monitoring Indicates a PR or issue relates to monitoring area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. ok-to-test release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants