-
Notifications
You must be signed in to change notification settings - Fork 37
Change retention policy of the OVNDBCluster PVCs to be "retained" #511
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: slawqo 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 |
dee6186 to
872def7
Compare
Synchronization of the OVN dbs with Neutron is pretty heavy and manual operation it is benefical to not delete those OVN databases when OVNDBCluster's PODs are deleted. To achieve that this patch removes `OwnerReference` attribute from the PVCs created for the OVNDBClusters so that they are not cleaned by the OpenShift's garbage collector and it also changes PersistentVolumeClaimRetentionPolicy when deleted and when scaled to the same `Retain` policy. Depends-On: openshift/release#71153 Closes: #OSPRH-19930 Signed-off-by: Slawek Kaplonski <[email protected]>
872def7 to
c19ce87
Compare
With [1] PVCs which are created for the OVN databases aren't cleaned automatically thus we should have more than 12 PVs created in the kuttl job so that each test will use different PVs and there will be no old data on the used PV. [1] openstack-k8s-operators/ovn-operator#511 Related: #OSPRH-19930 Signed-off-by: Slawek Kaplonski <[email protected]>
| // https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention | ||
| statefulset.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{ | ||
| WhenDeleted: appsv1.DeletePersistentVolumeClaimRetentionPolicyType, | ||
| WhenDeleted: appsv1.RetainPersistentVolumeClaimRetentionPolicyType, |
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.
There will be a problem with updates as it's not allowed to change RetentionPolicy https://github.com/kubernetes/kubernetes/blob/55ac11aad04e46851cf4244c54193926f92ff306/pkg/apis/apps/validation/validation.go#L267C1-L268C226
|
@slawqo: The following test failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
Synchronization of the OVN dbs with Neutron is pretty heavy and manual operation it is benefical to not delete those OVN databases when OVNDBCluster's PODs are deleted.
To achieve that this patch removes
OwnerReferenceattribute from the PVCs created for the OVNDBClusters so that they are not cleaned by the OpenShift's garbage collector and it also changesPersistentVolumeClaimRetentionPolicy when deleted and when scaled to the same
Retainpolicy.Depends-On: openshift/release#71153
Closes: #OSPRH-19930