Bug 2062337

Summary: velero schedules get re-created after the backupschedule is in 'BackupCollision' phase
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: Thuy Nguyen <thnguyen>
Component: DR4HubAssignee: vbirsan
Status: CLOSED ERRATA QA Contact: Thuy Nguyen <thnguyen>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhacm-2.5Flags: bot-tracker-sync: rhacm-2.5+
Target Milestone: ---   
Target Release: rhacm-2.5   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-09 02:09:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
policy history none

Description Thuy Nguyen 2022-03-09 15:11:33 UTC
Created attachment 1864933 [details]
policy history

Created attachment 1864933 [details]
policy history

Description of problem: velero schedules get re-created even though the backupschedule is in 'BackupCollision' phase


Version-Release number of selected component (if applicable):
- ACM 2.5.0-DOWNSTREAM-2022-03-03-03-15-27 (Final S3)
- MCE 2.0.0-DOWNANDBACK-2022-03-07-12-37-51"

How reproducible:


Steps to Reproduce:
1. Create backupschedule > velero schedules + backups created/uploaded onto backup storage OK
2. On another hub, create and upload backups to the same backup storage
3. The backupschedule in step 1 sets to 'BackupCollision'

Actual results:
Velero schedules get re-created after the backup schedule is in 'BackupCollision' phase

Expected results:

Additional info:

oc get bsch -n openshift-adp
NAME           PHASE             MESSAGE
schedule-acm   BackupCollision   Backup acm-resources-schedule-20220309060052, from cluster with id [] is using the same storage location. This is a backup collision with current cluster [a49530db-dc0b-41a4-b12b-5a2dac4835cc] backup. Review and resolve the collision then create a new BackupSchedule resource to  resume backups from this cluster.

oc get bsch -n openshift-adp schedule-acm -oyaml
apiVersion: cluster.open-cluster-management.io/v1beta1
kind: BackupSchedule
metadata:
  creationTimestamp: "2022-03-08T22:33:37Z"
  generation: 1
  name: schedule-acm
  namespace: openshift-adp
  resourceVersion: "173354549"
  uid: 4441a457-bd28-4590-9572-c46db7454ac2
spec:
  veleroSchedule: 0 */2 * * *
  veleroTtl: 72h
status:
  lastMessage: Backup acm-resources-schedule-20220309060052, from cluster with id
    [] is using the same storage location. This is a backup collision with current
    cluster [a49530db-dc0b-41a4-b12b-5a2dac4835cc] backup. Review and resolve the
    collision then create a new BackupSchedule resource to  resume backups from this
    cluster.
  phase: BackupCollision
  veleroScheduleCredentials:
    apiVersion: velero.io/v1
    kind: Schedule
    metadata: {}
    spec:
      schedule: 0 */2 * * *
      template:
        hooks: {}
        includeClusterResources: false
        includedResources:
        - secret
        - configmap
        labelSelector:
          matchExpressions:
          - key: cluster.open-cluster-management.io/type
            operator: Exists
        metadata: {}
        ttl: 72h0m0s
    status:
      lastBackup: "2022-03-09T06:00:36Z"
      phase: Enabled
  veleroScheduleManagedClusters:
    apiVersion: velero.io/v1
    kind: Schedule
    metadata: {}
    spec:
      schedule: 0 */2 * * *
      template:
        excludedNamespaces:
        - local-cluster
        hooks: {}
        includeClusterResources: true
        includedResources:
        - managedcluster.cluster.open-cluster-management.io
        - managedcluster.clusterview.open-cluster-management.io
        - klusterletaddonconfig.agent.open-cluster-management.io
        - managedclusteraddon.addon.open-cluster-management.io
        - managedclusterset.cluster.open-cluster-management.io
        - managedclusterset.clusterview.open-cluster-management.io
        - managedclustersetbinding.cluster.open-cluster-management.io
        - clusterpool.hive.openshift.io
        - clusterclaim.hive.openshift.io
        - clustercurator.cluster.open-cluster-management.io
        metadata: {}
        ttl: 72h0m0s
    status:
      lastBackup: "2022-03-09T06:00:36Z"
      phase: Enabled
  veleroScheduleResources:
    apiVersion: velero.io/v1
    kind: Schedule
    metadata: {}
    spec:
      schedule: 0 */2 * * *
      template:
        excludedNamespaces:
        - local-cluster
        - ocm
        hooks: {}
        includeClusterResources: true
        includedResources:
        - clusterdeployment.hive.openshift.io
        - machinepool.hive.openshift.io
        - managedproxyconfiguration.proxy.open-cluster-management.io
        - clusterstatus.proxy.open-cluster-management.io
        - placementrule.apps.open-cluster-management.io
        - channel.apps.open-cluster-management.io
        - subscription.apps.open-cluster-management.io
        - helmrelease.apps.open-cluster-management.io
        - deployable.apps.open-cluster-management.io
        - gitopscluster.apps.open-cluster-management.io
        - subscriptionstatus.apps.open-cluster-management.io
        - subscriptionreport.apps.open-cluster-management.io
        - placementdecision.cluster.open-cluster-management.io
        - placement.cluster.open-cluster-management.io
        - addonplacementscore.cluster.open-cluster-management.io
        - userpreference.console.open-cluster-management.io
        - discoveryconfig.discovery.open-cluster-management.io
        - clusterimageset.hive.openshift.io
        - hiveconfig.hive.openshift.io
        - selectorsyncidentityprovider.hive.openshift.io
        - syncidentityprovider.hive.openshift.io
        - scale.hive.openshift.io
        - clusterstate.hive.openshift.io
        - selectorsyncset.hive.openshift.io
        - machinepoolnamelease.hive.openshift.io
        - checkpoint.hive.openshift.io
        - syncset.hive.openshift.io
        - dnszone.hive.openshift.io
        - clusterprovision.hive.openshift.io
        - clusterrelocate.hive.openshift.io
        - clusterdeprovision.hive.openshift.io
        - iampolicy.policy.open-cluster-management.io
        - policy.policy.open-cluster-management.io
        - configurationpolicy.policy.open-cluster-management.io
        - placementbinding.policy.open-cluster-management.io
        - certificatepolicy.policy.open-cluster-management.io
        - policyset.policy.open-cluster-management.io
        - policyautomation.policy.open-cluster-management.io
        - applicationset.argoproj.io
        - argocd.argoproj.io
        - appproject.argoproj.io
        - application.argoproj.io
        - observatorium.core.observatorium.io
        - managedclusterimageregistry.imageregistry.open-cluster-management.io
        - baremetalasset.inventory.open-cluster-management.io
        - submarinerdiagnoseconfig.submarineraddon.open-cluster-management.io
        - submarinerconfig.submarineraddon.open-cluster-management.io
        - managedclusteraction.action.open-cluster-management.io
        - application.app.k8s.io
        - multiclusterobservability.observability.open-cluster-management.io
        - managedclusterview.view.open-cluster-management.io
        metadata: {}
        ttl: 72h0m0s
    status:
      lastBackup: "2022-03-09T06:00:36Z"
      phase: Enabled


oc get backups.velero -n openshift-adp | grep acm-resources-schedule
acm-resources-schedule-20220309060049             9h
acm-resources-schedule-20220309060052             9h
acm-resources-schedule-20220309063036             8h
acm-resources-schedule-20220309080036             7h8m
acm-resources-schedule-20220309100036             5h8m
acm-resources-schedule-20220309120029             3h6m
acm-resources-schedule-20220309120036             3h8m
acm-resources-schedule-20220309120050             3h6m
acm-resources-schedule-20220309120052             3h6m
acm-resources-schedule-20220309140036             68m


oc get schedules.velero -n openshift-adp
NAME                               AGE
acm-credentials-cluster-schedule   8h
acm-credentials-hive-schedule      8h
acm-credentials-schedule           8h
acm-managed-clusters-schedule      8h
acm-resources-generic-schedule     8h
acm-resources-schedule             8h

Comment 1 bot-tracker-sync 2022-03-15 17:47:09 UTC
G2Bsync 1068241062 comment 
 thuyn-581 Tue, 15 Mar 2022 17:12:30 UTC 
 G2Bsync -
Validated on ACM 2.5.0-DOWNSTREAM-2022-03-14-13-03-46 (S4)

Comment 4 errata-xmlrpc 2022-06-09 02:09:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Advanced Cluster Management 2.5 security updates, images, and bug fixes), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4956

Comment 5 Elise Campbell 2022-12-31 06:52:51 UTC Comment hidden (spam)