Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-19930

Ensure NB and SB OVN DBs are not deleted on cluster removal

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • rhos-18.0.z
    • ovn-operator
    • None

      Outcome of  OSPRH-645
      **

      Goal: 

      Since there is not an automated way of synchronizing ovn-provider with OVN DBs, it is benefitial to change PersistentVolumeClaimRetentionPolicy type to Retain in SB and NB OVN DBs so as to not end on an inconsistent state after a removal.

      We need to ensure PVCs and its PVs are not deleted or released after a removal. To do this, we can follow examples from other operators like mariaDB-operator, which does this already.

      We would need not just to change the policy https://github.com/openstack-k8s-operators/ovn-operator/blob/main/pkg/ovndbcluster/statefulset.go#L189C23-L189C69 but also to delete finalizers that might be present as seen in: https://github.com/openstack-k8s-operators/mariadb-operator/blob/e98cf8957b16be543ab8611ac8ea7c38e74d7818/api/v1beta1/mariadbdatabase_funcs.go#L533 

      More sources:
      https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention 

              Unassigned Unassigned
              egarciar@redhat.com Elvira Garcia
              rhos-dfg-networking-squad-neutron
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: