Uploaded image for project: 'OpenShift API for Data Protection'
  1. OpenShift API for Data Protection
  2. OADP-1822 OADP-1.1: Data Mover can restore from incorrect snapshot when >1 VSR for the restore name and PVC name exists.
  3. OADP-1838

[RedHat QE] Verify Bug OADP-1822 - OADP-1.1: Data Mover can restore from incorrect snapshot when >1 VSR for the restore name and PVC name exists.

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Passed
    • 0
    • 0
    • Very Likely
    • 0
    • None
    • Unset
    • Unknown

      Description of problem:

      OADP 1.1 Data Mover could restore from incorrect snapshot if there exists more than one VolumeSnapshotRestore resource in the cluster for the same velero restore name AND pvc name.

      In order to have create this scenario, you have to
      1. run data mover backup1
      2. restore1
      3. run data mover backup2
      4. restore2, may pick up snapshot from restore1

      When restoring During volumesnapshots.snapshot.storage.k8s.io restoreItemAction when VOLUME_SNAPSHOT_MOVER Env is true We wait for VolumeSnapshot.spec.Source.PersistentVolumeClaimName to be populated

      this is populated by volsync I think. We get VolumeSnapshotRestoreList using restoreName, PVC.Name.
      The list option used to get this list is

        VSRListOptions := client.MatchingLabels(map[string]string{
        		velerov1api.RestoreNameLabel: restoreName,
        		PersistentVolumeClaimLabel:   PVCName,
        	})
      

      When this list is returned, we assume the first volumeSnapshotRestore in the list is the one meant for this restore.

      			if len(vsrList.Items) > 0 {
      				snapHandle = vsrList.Items[0].Status.SnapshotHandle
      			} else {
      

      If more than one VSR in the cluster has this label (failed cleanup etc.), we're screwed.
      Restore issue workarounds
      Try restore using different name
      Try removing VolumeSnapshotRestore objects in the cluster prior to creating a new restore.

      Version-Release number of selected component (if applicable):

      How reproducible:

      Steps to Reproduce:
      1.
      2.
      3.

      Actual results:

      Expected results:

      Additional info:

      https://gist.github.com/kaovilai/c9f15c725dd2b49d12501de340710cbc

            rhn-support-prajoshi Prasad Joshi
            mperetz@redhat.com Maya Peretz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: