-
Notifications
You must be signed in to change notification settings - Fork 48
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
use DeleteDatabaseAndAccountFinalizers #862
use DeleteDatabaseAndAccountFinalizers #862
Conversation
ef327a6
to
fb0afd1
Compare
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/355719ef7f73466189f1f535b5b9c1e6 ✔️ openstack-meta-content-provider SUCCESS in 2h 51m 15s |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/4594b1e8fd484d02aa6bb428df5ccad7 ✔️ openstack-meta-content-provider SUCCESS in 1h 43m 06s |
this is a [DNM] patch. as its targeting a unmerged patch/build because the depends-on mariadb patch did not merged yet here okay its defined here though the change seems to be working fine here. but it is a [DNM] patch. |
this is not new functionality in the mariadb operator, it was there previously, and it's to delete any other MariaDBAccounts that may have existed previously regarding the particular MariaDBDatabase that the nova operator here wants to ensure is gone. when an account rotation occurs, a new MariaDBAccount is created, and finalizers will be removed from the old MariaDBAccount, however it does not automatically delete the old MariaDBAccount. this is not any kind of change right now. |
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.
Looks good to me. Lets land the mariadb-operator PR and then we can land this.
go.mod
Outdated
@@ -85,6 +85,8 @@ require ( | |||
|
|||
replace github.com/openstack-k8s-operators/nova-operator/api => ./api | |||
|
|||
replace github.com/openstack-k8s-operators/mariadb-operator/api => github.com/zzzeek/mariadb-operator/api v0.3.1-0.20240917193141-8598d28fb998 //allow-merging |
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.
don't use allow-merging, let the github check fail, this way we won't merge the PR before the dependency really lands.
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.
i added hold until that is fixed feel free to drop it when its rebased
need a rebase and the go.mod replace line can be removed now as the mariadb-operator PR is landed.h |
This switches the use of GetDatabaseAndAccount + database.DeleteFinalizers() to use a new function in mariadb DeleteDatabaseAndAccountFinalizers, which looks up each individual component used for database access individually and removes finalizers from all of those that were found, regardless of other elements not existing. All controllers should be changed to use this method to ensure that early-created MariaDBAccount objects are removed from a control plane where MariaDBDatabase objects did not get created before the control plane were deleted, as well as similar scenarios.
fb0afd1
to
561a6fa
Compare
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.
looks good.
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.
the depency is now merged and im ok with this change so approving
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gibizer, SeanMooney, zzzeek The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2b3d7d2
into
openstack-k8s-operators:main
This switches the use of GetDatabaseAndAccount +
database.DeleteFinalizers() to use a new function in mariadb DeleteDatabaseAndAccountFinalizers, which looks up each individual component used for database access individually and removes finalizers from all of those that were found, regardless of other elements not
existing. All controllers should be changed to use this method to
ensure that early-created MariaDBAccount objects are removed from a
control plane where MariaDBDatabase objects did not get created before
the control plane were deleted, as well as similar scenarios.
relies upon openstack-k8s-operators/mariadb-operator#268