Uploaded image for project: 'OpenShift API for Data Protection'
  1. OpenShift API for Data Protection
  2. OADP-170

Ensure testing of backup/restore internal images with Noobaa

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • OADP 1.0.0
    • None
    • None
    • None
    • False
    • False
    • Passed
    • 0
    • 0
    • Untriaged
    • None

      We must ensure that backup/restore of applications which use internal images works with an MCG bucket used as a backupstoragelocation. There is a known issue where the `region` parameter must be set but must be a valid AWS region even though it won't be used with Noobaa at all.

      Some folks in the past have tried setting the region to `noobaa` and that causes the registry to panic. Noobaa should work with region `us-east-1` set in the BSL.

            [OADP-170] Ensure testing of backup/restore internal images with Noobaa

            Verified on OADP 0.5.5-5 version; passed:

            • checked django app which uses internal image
            • checked region set as noobaa
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get dpa -n velero -o yaml
            apiVersion: v1
            items:
            - apiVersion: oadp.openshift.io/v1alpha1
              kind: DataProtectionApplication
              metadata:
                creationTimestamp: "2022-01-20T12:02:27Z"
                generation: 2
                name: example-velero
                namespace: velero
                resourceVersion: "89832"
                uid: 1c6322ef-0ca1-4f6c-9054-649be739b429
              spec:
                backupLocations:
                - velero:
                    config:
                      insecureSkipTLSVerify: "true"
                      profile: noobaa
                      region: noobaa
                      s3ForcePathStyle: "true"
                      s3Url: https://s3-openshift-storage.apps.mayap-oadp1234.qe.devcluster.openshift.com
                    credential:
                      key: cloud
                      name: cloud-credentials-aws
                    default: true
                    objectStorage:
                      bucket: mayapvelerooadp
                      prefix: velero
                    provider: aws
                configuration:
                  restic:
                    enable: true
                  velero:
                    defaultPlugins:
                    - openshift
                    - csi
                    - aws
              status:
                conditions:
                - lastTransitionTime: "2022-01-20T12:08:05Z"
                  message: Reconcile complete
                  reason: Complete
                  status: "True"
                  type: Reconciled
            kind: List
            metadata:
              resourceVersion: ""
              selfLink: ""
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup create backup$((i++)) --include-namespaces=oadp93
            Backup request "backup29" submitted successfully.
            Run `velero backup describe backup29` or `velero backup logs backup29` for more details.
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get
            NAME       STATUS      ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
            backup29   Completed   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc delete project oadp93
            project.project.openshift.io "oadp93" deleted
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get project oadp93
            NAME     DISPLAY NAME   STATUS
            oadp93                  Terminating
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get project oadp93 --watch
            NAME     DISPLAY NAME   STATUS
            oadp93                  Terminating
            oadp93                  
            ^mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero restore create --from-backup backup$((i-1)) --restore-volumes=true
            Restore request "backup29-20220120141140" submitted successfully.
            Run `velero restore describe backup29-20220120141140` or `velero restore logs backup29-20220120141140` for more details.
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero restore get
            NAME                      BACKUP     STATUS      STARTED                         COMPLETED                       ERRORS   WARNINGS   CREATED                         SELECTOR
            backup29-20220120141140   backup29   Completed   2022-01-20 14:11:41 +0200 IST   2022-01-20 14:11:44 +0200 IST   0        3          2022-01-20 14:11:41 +0200 IST   <none>
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views" 
              % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                             Dload  Upload   Total   Spent    Left  Speed
            100 18330  100 18330    0     0  32500      0 --:--:-- --:--:-- --:--:-- 32442
            Page views: 1
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views" 
              % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                             Dload  Upload   Total   Spent    Left  Speed
            100 18330  100 18330    0     0  38834      0 --:--:-- --:--:-- --:--:-- 38834
            Page views: 2
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views" 
              % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                             Dload  Upload   Total   Spent    Left  Speed
            100 18330  100 18330    0     0  39083      0 --:--:-- --:--:-- --:--:-- 39000
            Page views: 3
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views" 
              % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                             Dload  Upload   Total   Spent    Left  Speed
            100 18330  100 18330    0     0  38508      0 --:--:-- --:--:-- --:--:-- 38589
            Page views: 4
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get pods -n oadp93
            NAME                              READY   STATUS      RESTARTS   AGE
            django-psql-persistent-1-build    0/1     Completed   0          6m56s
            django-psql-persistent-2-deploy   0/1     Completed   0          6m14s
            django-psql-persistent-2-fbpm5    1/1     Running     0          6m11s
            postgresql-1-ddx2k                1/1     Running     0          6m54s
            postgresql-1-deploy               0/1     Completed   0          6m56s
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get pod/django-psql-persistent-2-fbpm5 -n oadp93 -o yaml | grep image
                image: image-registry.openshift-image-registry.svc:5000/oadp93/django-psql-persistent@sha256:9b4aad714f7ff3742870a00e5908d5c330309620d4d559446c7d654acd4851cc
                imagePullPolicy: IfNotPresent
              imagePullSecrets:
                image: image-registry.openshift-image-registry.svc:5000/oadp93/django-psql-persistent@sha256:9b4aad714f7ff3742870a00e5908d5c330309620d4d559446c7d654acd4851cc
                imageID: image-registry.openshift-image-registry.svc:5000/oadp93/django-psql-persistent@sha256:9b4aad714f7ff3742870a00e5908d5c330309620d4d559446c7d654acd4851cc
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get csv -n velero
            NAME                   DISPLAY         VERSION   REPLACES   PHASE
            oadp-operator.v0.5.5   OADP Operator   0.5.5                Succeeded
            (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 
            

            Maya Peretz added a comment - Verified on OADP 0.5.5-5 version; passed: checked django app which uses internal image checked region set as noobaa (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get dpa -n velero -o yaml apiVersion: v1 items: - apiVersion: oadp.openshift.io/v1alpha1   kind: DataProtectionApplication   metadata:     creationTimestamp: "2022-01-20T12:02:27Z"     generation: 2     name: example-velero     namespace: velero     resourceVersion: "89832"     uid: 1c6322ef-0ca1-4f6c-9054-649be739b429   spec:     backupLocations:     - velero:         config:           insecureSkipTLSVerify: "true"           profile: noobaa           region: noobaa           s3ForcePathStyle: "true"           s3Url: https://s3-openshift-storage.apps.mayap-oadp1234.qe.devcluster.openshift.com         credential:           key: cloud           name: cloud-credentials-aws         default: true         objectStorage:           bucket: mayapvelerooadp           prefix: velero         provider: aws     configuration:       restic:         enable: true       velero:         defaultPlugins:         - openshift         - csi         - aws   status:     conditions:     - lastTransitionTime: "2022-01-20T12:08:05Z"       message: Reconcile complete       reason: Complete       status: "True"       type: Reconciled kind: List metadata:   resourceVersion: ""   selfLink: "" (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup create backup$((i++)) --include-namespaces=oadp93 Backup request "backup29" submitted successfully. Run `velero backup describe backup29` or `velero backup logs backup29` for more details. (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   InProgress   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero backup get NAME       STATUS      ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR backup29   Completed   0        0          2022-01-20 14:10:01 +0200 IST   29d       example-velero-1   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc delete project oadp93 project.project.openshift.io "oadp93" deleted (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get project oadp93 NAME     DISPLAY NAME   STATUS oadp93                  Terminating (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get project oadp93 --watch NAME     DISPLAY NAME   STATUS oadp93                  Terminating oadp93                   ^mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero restore create --from-backup backup$((i-1)) --restore-volumes=true Restore request "backup29-20220120141140" submitted successfully. Run `velero restore describe backup29-20220120141140` or `velero restore logs backup29-20220120141140` for more details. (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ velero restore get NAME                      BACKUP     STATUS      STARTED                         COMPLETED                       ERRORS   WARNINGS   CREATED                         SELECTOR backup29-20220120141140   backup29   Completed   2022-01-20 14:11:41 +0200 IST   2022-01-20 14:11:44 +0200 IST   0        3          2022-01-20 14:11:41 +0200 IST   <none> (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views"    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100 18330  100 18330    0     0  32500      0 --:--:-- --:--:-- --:--:-- 32442 Page views: 1 (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views"    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100 18330  100 18330    0     0  38834      0 --:--:-- --:--:-- --:--:-- 38834 Page views: 2 (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views"    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100 18330  100 18330    0     0  39083      0 --:--:-- --:--:-- --:--:-- 39000 Page views: 3 (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ curl http://$(oc -n oadp93  get route django-psql-persistent -o jsonpath='{.spec.host}') | grep "Page views"    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100 18330  100 18330    0     0  38508      0 --:--:-- --:--:-- --:--:-- 38589 Page views: 4 (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get pods -n oadp93 NAME                              READY   STATUS      RESTARTS   AGE django-psql-persistent-1-build    0/1     Completed   0          6m56s django-psql-persistent-2-deploy   0/1     Completed   0          6m14s django-psql-persistent-2-fbpm5    1/1     Running     0          6m11s postgresql-1-ddx2k                1/1     Running     0          6m54s postgresql-1-deploy               0/1     Completed   0          6m56s (mtc-e2e-venv) [mperetz@mperetz velero-examples]$  (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get pod/django-psql-persistent-2-fbpm5 -n oadp93 -o yaml | grep image     image: image-registry.openshift-image-registry.svc:5000/oadp93/django-psql-persistent@sha256:9b4aad714f7ff3742870a00e5908d5c330309620d4d559446c7d654acd4851cc     imagePullPolicy: IfNotPresent   imagePullSecrets:     image: image-registry.openshift-image-registry.svc:5000/oadp93/django-psql-persistent@sha256:9b4aad714f7ff3742870a00e5908d5c330309620d4d559446c7d654acd4851cc     imageID: image-registry.openshift-image-registry.svc:5000/oadp93/django-psql-persistent@sha256:9b4aad714f7ff3742870a00e5908d5c330309620d4d559446c7d654acd4851cc (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ oc get csv -n velero NAME                   DISPLAY         VERSION   REPLACES   PHASE oadp-operator.v0.5.5   OADP Operator   0.5.5                Succeeded (mtc-e2e-venv) [mperetz@mperetz velero-examples]$ 

            Daniel Gur added a comment - - edited

            rhn-engineering-dymurray I see this story was added after feature freeze?

            Daniel Gur added a comment - - edited rhn-engineering-dymurray I see this story was added after feature freeze?

              Unassigned Unassigned
              rhn-engineering-dymurray Dylan Murray
              Maya Peretz Maya Peretz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: