Skip to content

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Aug 16, 2022

Currently restic backup cases are not setting this value and thus we have not actually verified restic backup of pod volumes are working.

This PR enables restic backup and enable restic restore data verification.
Stopped setting bsl.spec.config["credentialsFile"] to avoid vmware-tanzu/velero#5228

@kaovilai kaovilai force-pushed the e2eDefaultVolumesToRestic branch from 91699c6 to 6ef8888 Compare August 16, 2022 14:33
@kaovilai
Copy link
Member Author

/cherry-pick oadp-1.1

@openshift-cherrypick-robot
Copy link
Contributor

@kaovilai: once the present PR merges, I will cherry-pick it on top of oadp-1.1 in a new PR and assign it to you.

In response to this:

/cherry-pick oadp-1.1

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/test-infra repository.

Copy link
Member

@shubham-pampattiwar shubham-pampattiwar left a comment

Choose a reason for hiding this comment

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

lgtm!

@openshift-ci openshift-ci bot requested review from eemcmullan and sseago August 16, 2022 14:38
@kaovilai kaovilai changed the title set defaultVolumesToRestic in e2e for restic backup e2e: set defaultVolumesToRestic for restic backup Aug 16, 2022
@kaovilai
Copy link
Member Author

Seeing restic permission issue on aws

time="2022-08-16T15:39:31Z" level=error msg="Error backing up item" backup=openshift-adp/mongo-restic-e2e-27b080db-1d79-11ed-ba2a-0a580a812025 error="pod volume backup failed: running Restic backup, stderr=Fatal: unable to open config file: Stat: Access Denied.\nIs there a repository at the following location?\ns3:s3-us-east-1.amazonaws.com/velero-6109f5e9711c8c58131acdd2f490f451/velero-e2e-640f08b6-a42d-4088-87ab-2569b8e15c4c/restic/mongo-persistent\n: exit status 1" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/restic/backupper.go:199" error.function="github.com/vmware-tanzu/velero/pkg/restic.(*backupper).BackupPodVolumes" logSource="pkg/backup/backup.go:417" name=mongo-64fdc89c69-b4t6x

@kaovilai
Copy link
Member Author

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2022

Codecov Report

Merging #790 (e4e68f0) into master (4c1c497) will decrease coverage by 0.29%.
The diff coverage is 36.36%.

@@            Coverage Diff             @@
##           master     #790      +/-   ##
==========================================
- Coverage   31.98%   31.68%   -0.30%     
==========================================
  Files          16       16              
  Lines        3064     3080      +16     
==========================================
- Hits          980      976       -4     
- Misses       1993     2012      +19     
- Partials       91       92       +1     
Impacted Files Coverage Δ
controllers/validator.go 55.26% <0.00%> (-5.61%) ⬇️
controllers/velero.go 47.98% <11.11%> (-0.64%) ⬇️
pkg/credentials/credentials.go 21.68% <58.33%> (-2.01%) ⬇️
controllers/datamover.go 12.99% <75.00%> (+0.45%) ⬆️
controllers/restic.go 48.71% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kaovilai kaovilai force-pushed the e2eDefaultVolumesToRestic branch 8 times, most recently from f4b3f3e to ff408e6 Compare August 17, 2022 17:17
fix restic prebackup verify

delete backupFile if it exists

Print command output, fix err handling.

ignore log `num errors=0`

merge fix

fix cutset
eliminate custom "credentialsFile", prefering bsl.Credentials

trim restore name, run post restore script

keep 43 chars for restore name with uuid

restore name no longer needs trimming

Fix creating restore name

detect sha256sum is working else use shasum

update checksum_cmd to uppercase and actually use var
@kaovilai kaovilai force-pushed the e2eDefaultVolumesToRestic branch from ff408e6 to 7caf097 Compare August 17, 2022 17:23
@kaovilai kaovilai force-pushed the e2eDefaultVolumesToRestic branch from 8f8b07c to 2419c30 Compare August 17, 2022 17:36
@kaovilai kaovilai force-pushed the e2eDefaultVolumesToRestic branch from 2419c30 to 369af21 Compare August 17, 2022 17:40
@kaovilai kaovilai changed the title e2e: set defaultVolumesToRestic for restic backup e2e: set defaultVolumesToRestic for restic backup, enable restic restore data verification Aug 17, 2022
@kaovilai kaovilai requested a review from hhpatel14 August 17, 2022 19:33
@kaovilai
Copy link
Member Author

gcp BSL is different than expected.

print diff

Make nill velero config map equal to empty map.
@kaovilai kaovilai force-pushed the e2eDefaultVolumesToRestic branch from 29c399a to 4268d24 Compare August 17, 2022 20:15
@kaovilai
Copy link
Member Author

kaovilai commented Aug 17, 2022

Fixed BSL diff check. GCP was erroring due to config being nil compared to empty config.

@kaovilai kaovilai changed the title e2e: set defaultVolumesToRestic for restic backup, enable restic restore data verification e2e: set defaultVolumesToRestic for restic backup, enable restic restore data verification, remove two-phase restore. Aug 17, 2022
@kaovilai
Copy link
Member Author

/test 4.7-operator-e2e-azure
/test 4.8-operator-e2e-aws
/test 4.8-operator-e2e-azure

@openshift-ci
Copy link

openshift-ci bot commented Aug 17, 2022

@kaovilai: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

@kaovilai kaovilai merged commit 0886263 into openshift:master Aug 18, 2022
@openshift-cherrypick-robot
Copy link
Contributor

@kaovilai: new pull request created: #797

In response to this:

/cherry-pick oadp-1.1

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/test-infra repository.

kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Aug 24, 2022
set defaultVolumesToRestic in e2e for restic backup

fix restic prebackup verify

delete backupFile if it exists

Print command output, fix err handling.

ignore log `num errors=0`

merge fix

fix cutset

variable renames, DpaCustomResource struct cleanup

eliminate custom "credentialsFile", prefering bsl.Credentials

trim restore name, run post restore script

keep 43 chars for restore name with uuid

restore name no longer needs trimming

Fix creating restore name

detect sha256sum is working else use shasum

update checksum_cmd to uppercase and actually use var

remove two-phase restore. Use single restore with post restore script.

refactor DoesBSLExist, DoesVSLExist

print diff

Make nill velero config map equal to empty map.
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Aug 24, 2022
set defaultVolumesToRestic in e2e for restic backup

fix restic prebackup verify

delete backupFile if it exists

Print command output, fix err handling.

ignore log `num errors=0`

merge fix

fix cutset

variable renames, DpaCustomResource struct cleanup

eliminate custom "credentialsFile", prefering bsl.Credentials

trim restore name, run post restore script

keep 43 chars for restore name with uuid

restore name no longer needs trimming

Fix creating restore name

detect sha256sum is working else use shasum

update checksum_cmd to uppercase and actually use var

remove two-phase restore. Use single restore with post restore script.

refactor DoesBSLExist, DoesVSLExist

print diff

Make nill velero config map equal to empty map.
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Aug 26, 2022
set defaultVolumesToRestic in e2e for restic backup

fix restic prebackup verify

delete backupFile if it exists

Print command output, fix err handling.

ignore log `num errors=0`

merge fix

fix cutset

variable renames, DpaCustomResource struct cleanup

eliminate custom "credentialsFile", prefering bsl.Credentials

trim restore name, run post restore script

keep 43 chars for restore name with uuid

restore name no longer needs trimming

Fix creating restore name

detect sha256sum is working else use shasum

update checksum_cmd to uppercase and actually use var

remove two-phase restore. Use single restore with post restore script.

refactor DoesBSLExist, DoesVSLExist

print diff

Make nill velero config map equal to empty map.

cherry-pick of openshift#801

e2e: Increase app build timeouts to 5 minutes

Create PVC for CSI before installing app.

Add mongo pvc for ibm cloud

InstallApplication Update if already exists. Resolves issue if existing is outdated

Revert "Create PVC for CSI before installing app."

This reverts commit efdb994.

e2e: resolve pvc create failure if previous test fail to uninstall app namespace

Change backup timeout to 12 minutes

Example of test failing because it didn't wait long enough https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_oadp-operator/801/pull-ci-openshift-oadp-operator-master-4.11-operator-e2e-aws/1561223345897213952#1:build-log.txt%3A7247
Default velero csi snapshot timeout is 10 minutes.

Resolve azure 4.8, 4.9 fallback namespace deletion failure due to empty resource name.

Revert "cherry-pick of openshift#801"

This reverts commit b9bc43e.
weshayutin pushed a commit that referenced this pull request Aug 26, 2022
…tion, tuning timeouts, reliability (#806)

* cherry-pick #790

set defaultVolumesToRestic in e2e for restic backup

fix restic prebackup verify

delete backupFile if it exists

Print command output, fix err handling.

ignore log `num errors=0`

merge fix

fix cutset

variable renames, DpaCustomResource struct cleanup

eliminate custom "credentialsFile", prefering bsl.Credentials

trim restore name, run post restore script

keep 43 chars for restore name with uuid

restore name no longer needs trimming

Fix creating restore name

detect sha256sum is working else use shasum

update checksum_cmd to uppercase and actually use var

remove two-phase restore. Use single restore with post restore script.

refactor DoesBSLExist, DoesVSLExist

print diff

Make nill velero config map equal to empty map.

cherry-pick of #801

e2e: Increase app build timeouts to 5 minutes

Create PVC for CSI before installing app.

Add mongo pvc for ibm cloud

InstallApplication Update if already exists. Resolves issue if existing is outdated

Revert "Create PVC for CSI before installing app."

This reverts commit efdb994.

e2e: resolve pvc create failure if previous test fail to uninstall app namespace

Change backup timeout to 12 minutes

Example of test failing because it didn't wait long enough https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_oadp-operator/801/pull-ci-openshift-oadp-operator-master-4.11-operator-e2e-aws/1561223345897213952#1:build-log.txt%3A7247
Default velero csi snapshot timeout is 10 minutes.

Resolve azure 4.8, 4.9 fallback namespace deletion failure due to empty resource name.

Revert "cherry-pick of #801"

This reverts commit b9bc43e.

* e2e: print container logs on failure only, increase app build timeouts (#801)

* e2e: do not print container logs on server version skip

* e2e: Increase app build timeouts to 5 minutes

* Create PVC for CSI before installing app.

* Add mongo pvc for ibm cloud

* InstallApplication Update if already exists. Resolves issue if existing is outdated

* Revert "Create PVC for CSI before installing app."

This reverts commit efdb994.

* e2e: resolve pvc create failure if previous test fail to uninstall app namespace

* Change backup timeout to 12 minutes

Example of test failing because it didn't wait long enough https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_oadp-operator/801/pull-ci-openshift-oadp-operator-master-4.11-operator-e2e-aws/1561223345897213952#1:build-log.txt%3A7247
Default velero csi snapshot timeout is 10 minutes.

* Resolve azure 4.8, 4.9 fallback namespace deletion failure due to empty resource name.

* DeepEqual check resource fields before making update call

Signed-off-by: Tiger Kaovilai <[email protected]>

Signed-off-by: Tiger Kaovilai <[email protected]>

Signed-off-by: Tiger Kaovilai <[email protected]>
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.

5 participants