-
Notifications
You must be signed in to change notification settings - Fork 497
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
Backport #15780 - Fix data race dbaccessor #15845
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following fixes the issue when rebinding the address and a worker is starting the dbApp can be nil. To fix the problem we check if the underlying catacomb is dying. If that's the case then return that error. If it's not dying, force the worker to try again with the new sentinel error. As all errors where currently fatal, we add a check to ensure that if the error is ErrTryAgain, that a worker can come around and attempt to try the worker again. Upon the next time around if the catacomb is dying, then it will correctly die. If the dbApp is still nil, it will continue trying, otherwise it will create a worker. We're leaning into the way the runner works here to ensure that we can handle the case of a dbApp worker being nil. Also you can not put the worker creation outside of the start worker function, as this opens up possibilities of a worker being created twice and only one of them being used.
The following just updates the error message to be more helpful when a error happens.
As a driveby make const error a real const.
tlm
approved these changes
Jul 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/merge |
jujubot
added a commit
that referenced
this pull request
Jul 7, 2023
#15881 Merges: - #15845 - #15852 - #15854 - #15849 - #15855 - #15857 - #15861 - #15862 - #15825 - #15866 - #15863 - #15870 - #15871 - #15872 - #15873 - #15874 - #15875 One substantial conflict in `cmd/juju/application/deployer/bundlehandler.go` & `cmd/juju/application/deployer/bundlehandler_test.go`, resulting in failing unit tests. The conflict relates to this PR: - #15825 These were fixed by the two tops commits ### QA Steps Ensure all unit tests pass ``` go test github.com/juju/juju/cmd/juju/application/deployer go test github.com/juju/juju/core/charm go test github.com/juju/juju/apiserver/facades/client/application ``` Ensure we can deploy a complex bundle ``` juju deploy kubeflow ```
Merged
jujubot
added a commit
that referenced
this pull request
Jul 11, 2023
#15896 Forward ports: - #15845 - #15725 - #15852 - #15854 - #15849 - #15855 - #15857 - #15861 - #15862 - #15860 - #15864 - #15825 - #15866 - #15863 - #15870 - #15871 - #15872 - #15873 - #15874 - #15876 - #15875 - #15881 - #15727 - #15883 - #15884 - #15880 - #15879 - #15886 - #15887 - #15877 - #15888 - #15893 - #15894 Conflicts: - cmd/juju/ssh/debugcode_test.go - cmd/juju/ssh/debughooks_test.go - cmd/juju/ssh/scp_unix_test.go - cmd/juju/ssh/ssh_machine.go - cmd/juju/ssh/ssh_machine_test.go - cmd/juju/ssh/ssh_unix_test.go - worker/dbaccessor/worker.go - caas/kubernetes/provider/k8s_test.go - caas/kubernetes/provider/operator_test.go - caas/kubernetes/provider/package_test.go - caas/kubernetes/provider/rbac.go - cmd/juju/application/deployer/bundlehandler.go - cmd/juju/application/deployer/bundlehandler_test.go - cmd/jujud/agent/model/manifolds.go - core/bundle/changes/changes.go - worker/caasapplicationprovisioner/application.go - worker/caasapplicationprovisioner/application_test.go - worker/caasapplicationprovisioner/mock_test.go
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports #15780 to fix data race in dbaccessor.