Skip to content

Conversation

@slawqo
Copy link
Contributor

@slawqo slawqo commented Nov 6, 2025

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

@openshift-ci openshift-ci bot requested review from abays and karelyatin November 6, 2025 15:22
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Nov 6, 2025
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]>
@slawqo slawqo force-pushed the issue/OSPRH-19930 branch from 872def7 to c19ce87 Compare November 7, 2025 13:22
slawqo added a commit to slawqo/release that referenced this pull request Nov 7, 2025
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,
Copy link
Contributor

Choose a reason for hiding this comment

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 7, 2025

@slawqo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ovn-operator-build-deploy-kuttl c19ce87 link true /test ovn-operator-build-deploy-kuttl

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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants