forked from vmware-tanzu/velero
-
Notifications
You must be signed in to change notification settings - Fork 20
Merge https://github.com/vmware-tanzu/velero:main (66ac235) into oadp-dev #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oadp-rebasebot-app
wants to merge
56
commits into
openshift:oadp-dev
Choose a base branch
from
oadp-rebasebot:rebase-bot-oadp-dev
base: oadp-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+211
−112
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
bbec46f
Add e2e test case for PR 9366: Use hookIndex for recording multiple r…
a9b3cfa
Disable Algolia docs search.
blackpiglet 2145c57
Merge pull request #9562 from hollycai05/add-e2e-test-for-PR9366
blackpiglet a31f4ab
Fix DBR stuck when CSI snapshot no longer exists in cloud provider (#…
shubham-pampattiwar afe7df1
Add itemOperationTimeout to Schedule API type docs (#9599)
shubham-pampattiwar 66ac235
Merge pull request #9595 from vmware-tanzu/xj014661/main/disable_sear…
blackpiglet 8490196
merge upstream/main into oadp-dev
oadp-maintainers 8f261df
skip subresource in resource discovery (#6688)
reasonerjt 6ebc4bd
fix issue 6753
Lyndon-Li aa2a430
Update restore controller logic for restore deletion (#6761)
ywk253100 6211cd5
Fix #6752: add namespace exclude check.
c2865fc
add csi snapshot data movement doc
Lyndon-Li c91965b
Modify changelogs for v1.12
allenxu404 ae20e8c
issue 6786:always delete VSC regardless of the deletion policy
Lyndon-Li 9be3357
issue: move plugin depdending podvolume functions to util pkg
Lyndon-Li 24c7995
issue 6880: set ParallelUploadAboveSize as MaxInt64
Lyndon-Li 8e50fd5
changelog
kaovilai 34e49a4
Add support for block volumes (#6680) (#6897)
dzaninovic e6af57a
Replace the base image with paketobuildpacks image
ywk253100 0f1e5f0
issue 6734: spread backup pod evenly
Lyndon-Li aceb5c5
Add doc links for new features to release note
allenxu404 e1e0b15
fix issue 6647
Lyndon-Li 5e03688
Perf improvements for existing resource restore
sseago 8824614
issue #6807: Retry failed create when using generateName
sseago ac6ae9a
Import auth provider plugins
0x113 f4f63cc
Add v1.12.1 changelog
allenxu404 3002bed
Make Windows build skip BlockMode code.
f019ce8
udmrepo use region specified in BSL when s3URL is empty
Lyndon-Li fe7aba1
Change v1.12.1 changelog
allenxu404 530ef3b
Dockerfile.ubi/travis local files
dymurray c662266
Add BZ + Publish automation to repo (#82)
rayfordj 1a0deb1
remove dependabot config from fork
sseago b27359d
Create Makefile.prow
kaovilai 424d85e
set HOME in velero image for kopia, update controller-gen for CI (#280)
sseago 4c8d5b6
build velero-helper binary for datamover pod
sseago 2944455
restore: Use warning when Create IsAlreadyExist and Get error
kaovilai d8e6b09
kopia/repository/config/aws.go: Set session.Options profile from config
kaovilai 7568983
use ubi9-latest to build
sseago 54c9592
OADP-4225: add tzdata to Dockerfile.ubi
sseago 1cdcf58
fix: CI (#316)
f3655e6
fix: ARM images (#332)
7c23ecf
ubi: BUILDPLATFORM to build stage to enable cross compile. (#336)
kaovilai 47aa139
OADP-4640: Downstream only to allow override kopia default algorithms…
mpryc a6af005
Downstream only: Rework of Makefile and incusion of lint
mpryc 6c0755b
Downstream only - fix lint error in downtream change (#343)
mpryc 18e99d1
run oadp-operator e2e test from the velero repo (#353)
weshayutin f5472a3
DS Owners
kaovilai 8065ebf
updated controller-gen version
sseago 39da040
Include velero-restore-helper binary in velero image (#374)
sseago b095126
Fix restic checkout in Dockerfile.ubi to get default branch (#436)
sseago eec869d
UPSTREAM: <drop>: Updating go modules
oadp-maintainers bc51c3f
UPSTREAM: <drop>: update restic @ 8c4c3fbfe (branch oadp-dev)
oadp-maintainers c602485
UPSTREAM: <carry> Use context from test for the kopia algorithms
oadp-maintainers e127cf5
UPSTREAM: <drop>: Updating go modules
oadp-maintainers 8c5ac2e
UPSTREAM: <carry>: Fix golangci-lint configuration for v2.x
mpryc 3e35877
UPSTREAM: <drop>: Fix malformed unicode characters in filenames
oadp-maintainers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix DBR stuck when CSI snapshot no longer exists in cloud provider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| /* | ||
| Copyright the Velero contributors. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package basic | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "path" | ||
| "strings" | ||
|
|
||
| . "github.com/onsi/ginkgo/v2" | ||
| . "github.com/onsi/gomega" | ||
|
|
||
| "github.com/vmware-tanzu/velero/test/e2e/test" | ||
| . "github.com/vmware-tanzu/velero/test/e2e/test" | ||
| "github.com/vmware-tanzu/velero/test/util/common" | ||
| . "github.com/vmware-tanzu/velero/test/util/k8s" | ||
| ) | ||
|
|
||
| // RestoreExecHooks tests that a pod with multiple restore exec hooks does not hang | ||
| // at the Finalizing phase during restore (Issue #9359 / PR #9366). | ||
| type RestoreExecHooks struct { | ||
| TestCase | ||
| podName string | ||
| } | ||
|
|
||
| var RestoreExecHooksTest func() = test.TestFunc(&RestoreExecHooks{}) | ||
|
|
||
| func (r *RestoreExecHooks) Init() error { | ||
| Expect(r.TestCase.Init()).To(Succeed()) | ||
| r.CaseBaseName = "restore-exec-hooks-" + r.UUIDgen | ||
| r.BackupName = "backup-" + r.CaseBaseName | ||
| r.RestoreName = "restore-" + r.CaseBaseName | ||
| r.podName = "pod-multiple-hooks" | ||
| r.NamespacesTotal = 1 | ||
| r.NSIncluded = &[]string{} | ||
|
|
||
| for nsNum := 0; nsNum < r.NamespacesTotal; nsNum++ { | ||
| createNSName := fmt.Sprintf("%s-%00000d", r.CaseBaseName, nsNum) | ||
| *r.NSIncluded = append(*r.NSIncluded, createNSName) | ||
| } | ||
|
|
||
| r.TestMsg = &test.TestMSG{ | ||
| Desc: "Restore pod with multiple restore exec hooks", | ||
| Text: "Should successfully backup and restore without hanging at Finalizing phase", | ||
| FailedMSG: "Failed to successfully backup and restore pod with multiple hooks", | ||
| } | ||
|
|
||
| r.BackupArgs = []string{ | ||
| "create", "--namespace", r.VeleroCfg.VeleroNamespace, "backup", r.BackupName, | ||
| "--include-namespaces", strings.Join(*r.NSIncluded, ","), | ||
| "--default-volumes-to-fs-backup", "--wait", | ||
| } | ||
|
|
||
| r.RestoreArgs = []string{ | ||
| "create", "--namespace", r.VeleroCfg.VeleroNamespace, "restore", r.RestoreName, | ||
| "--from-backup", r.BackupName, "--wait", | ||
| } | ||
|
|
||
| return nil | ||
| } | ||
|
|
||
| func (r *RestoreExecHooks) CreateResources() error { | ||
| for nsNum := 0; nsNum < r.NamespacesTotal; nsNum++ { | ||
| createNSName := fmt.Sprintf("%s-%00000d", r.CaseBaseName, nsNum) | ||
|
|
||
| By(fmt.Sprintf("Creating namespace %s", createNSName), func() { | ||
| Expect(CreateNamespace(r.Ctx, r.Client, createNSName)). | ||
| To(Succeed(), fmt.Sprintf("Failed to create namespace %s", createNSName)) | ||
| }) | ||
|
|
||
| // Prepare images and commands adaptively for the target OS | ||
| imageAddress := LinuxTestImage | ||
| initCommand := `["/bin/sh", "-c", "echo init-hook-done"]` | ||
| execCommand1 := `["/bin/sh", "-c", "echo hook1"]` | ||
| execCommand2 := `["/bin/sh", "-c", "echo hook2"]` | ||
|
|
||
| if r.VeleroCfg.WorkerOS == common.WorkerOSLinux && r.VeleroCfg.ImageRegistryProxy != "" { | ||
| imageAddress = path.Join(r.VeleroCfg.ImageRegistryProxy, LinuxTestImage) | ||
| } else if r.VeleroCfg.WorkerOS == common.WorkerOSWindows { | ||
| imageAddress = WindowTestImage | ||
| initCommand = `["cmd", "/c", "echo init-hook-done"]` | ||
| execCommand1 = `["cmd", "/c", "echo hook1"]` | ||
| execCommand2 = `["cmd", "/c", "echo hook2"]` | ||
| } | ||
|
|
||
| // Inject mixing InitContainer hook and multiple Exec post-restore hooks. | ||
| // This guarantees that the loop index 'i' mismatched 'hook.hookIndex' (Issue #9359), | ||
| // ensuring the bug is properly reproduced and the fix is verified. | ||
| ann := map[string]string{ | ||
| // Inject InitContainer Restore Hook | ||
| "init.hook.restore.velero.io/container-image": imageAddress, | ||
| "init.hook.restore.velero.io/container-name": "test-init-hook", | ||
| "init.hook.restore.velero.io/command": initCommand, | ||
|
|
||
| // Inject multiple Exec Restore Hooks | ||
| "post.hook.restore.velero.io/test1.command": execCommand1, | ||
| "post.hook.restore.velero.io/test1.container": r.podName, | ||
| "post.hook.restore.velero.io/test2.command": execCommand2, | ||
| "post.hook.restore.velero.io/test2.container": r.podName, | ||
| } | ||
|
|
||
| By(fmt.Sprintf("Creating pod %s with multiple restore hooks in namespace %s", r.podName, createNSName), func() { | ||
| _, err := CreatePod( | ||
| r.Client, | ||
| createNSName, | ||
| r.podName, | ||
| "", // No storage class needed | ||
| "", // No PVC needed | ||
| []string{}, // No volumes | ||
| nil, | ||
| ann, | ||
| r.VeleroCfg.ImageRegistryProxy, | ||
| r.VeleroCfg.WorkerOS, | ||
| ) | ||
| Expect(err).To(Succeed(), fmt.Sprintf("Failed to create pod with hooks in namespace %s", createNSName)) | ||
| }) | ||
|
|
||
| By(fmt.Sprintf("Waiting for pod %s to be ready", r.podName), func() { | ||
| err := WaitForPods(r.Ctx, r.Client, createNSName, []string{r.podName}) | ||
| Expect(err).To(Succeed(), fmt.Sprintf("Failed to wait for pod %s in namespace %s", r.podName, createNSName)) | ||
| }) | ||
| } | ||
| return nil | ||
| } | ||
|
|
||
| func (r *RestoreExecHooks) Verify() error { | ||
| for nsNum := 0; nsNum < r.NamespacesTotal; nsNum++ { | ||
| createNSName := fmt.Sprintf("%s-%00000d", r.CaseBaseName, nsNum) | ||
|
|
||
| By(fmt.Sprintf("Verifying pod %s in namespace %s after restore", r.podName, createNSName), func() { | ||
| err := WaitForPods(r.Ctx, r.Client, createNSName, []string{r.podName}) | ||
| Expect(err).To(Succeed(), fmt.Sprintf("Failed to verify pod %s in namespace %s after restore", r.podName, createNSName)) | ||
| }) | ||
| } | ||
| return nil | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammatical error in documentation.
Line 68 contains a grammatical error: "The default value is 4 hour." should be "The default value is 4 hours." (plural).
Note: The same grammatical issue exists in line 65 ("10 minute" should be "10 minutes"). Consider fixing both for consistency.
📝 Proposed fix
# ItemOperationTimeout specifies the time used to wait for # asynchronous BackupItemAction operations - # The default value is 4 hour. + # The default value is 4 hours. itemOperationTimeout: 4hIf fixing line 65 as well:
# CSISnapshotTimeout specifies the time used to wait for # CSI VolumeSnapshot status turns to ReadyToUse during creation, before - # returning error as timeout. The default value is 10 minute. + # returning error as timeout. The default value is 10 minutes. csiSnapshotTimeout: 10m📝 Committable suggestion
🤖 Prompt for AI Agents