Skip to content
Open
Show file tree
Hide file tree
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…
Feb 26, 2026
a9b3cfa
Disable Algolia docs search.
blackpiglet Mar 10, 2026
2145c57
Merge pull request #9562 from hollycai05/add-e2e-test-for-PR9366
blackpiglet Mar 10, 2026
a31f4ab
Fix DBR stuck when CSI snapshot no longer exists in cloud provider (#…
shubham-pampattiwar Mar 10, 2026
afe7df1
Add itemOperationTimeout to Schedule API type docs (#9599)
shubham-pampattiwar Mar 10, 2026
66ac235
Merge pull request #9595 from vmware-tanzu/xj014661/main/disable_sear…
blackpiglet Mar 11, 2026
8490196
merge upstream/main into oadp-dev
oadp-maintainers Mar 12, 2026
8f261df
skip subresource in resource discovery (#6688)
reasonerjt Aug 23, 2023
6ebc4bd
fix issue 6753
Lyndon-Li Sep 5, 2023
aa2a430
Update restore controller logic for restore deletion (#6761)
ywk253100 Sep 6, 2023
6211cd5
Fix #6752: add namespace exclude check.
Sep 5, 2023
c2865fc
add csi snapshot data movement doc
Lyndon-Li Sep 8, 2023
c91965b
Modify changelogs for v1.12
allenxu404 Sep 19, 2023
ae20e8c
issue 6786:always delete VSC regardless of the deletion policy
Lyndon-Li Sep 13, 2023
9be3357
issue: move plugin depdending podvolume functions to util pkg
Lyndon-Li Sep 26, 2023
24c7995
issue 6880: set ParallelUploadAboveSize as MaxInt64
Lyndon-Li Sep 28, 2023
8e50fd5
changelog
kaovilai Aug 28, 2023
34e49a4
Add support for block volumes (#6680) (#6897)
dzaninovic Sep 29, 2023
e6af57a
Replace the base image with paketobuildpacks image
ywk253100 Sep 27, 2023
0f1e5f0
issue 6734: spread backup pod evenly
Lyndon-Li Oct 10, 2023
aceb5c5
Add doc links for new features to release note
allenxu404 Sep 28, 2023
e1e0b15
fix issue 6647
Lyndon-Li Aug 28, 2023
5e03688
Perf improvements for existing resource restore
sseago Aug 21, 2023
8824614
issue #6807: Retry failed create when using generateName
sseago Sep 13, 2023
ac6ae9a
Import auth provider plugins
0x113 Oct 12, 2023
f4f63cc
Add v1.12.1 changelog
allenxu404 Oct 20, 2023
3002bed
Make Windows build skip BlockMode code.
Oct 20, 2023
f019ce8
udmrepo use region specified in BSL when s3URL is empty
Lyndon-Li Oct 20, 2023
fe7aba1
Change v1.12.1 changelog
allenxu404 Oct 20, 2023
530ef3b
Dockerfile.ubi/travis local files
dymurray Jun 29, 2020
c662266
Add BZ + Publish automation to repo (#82)
rayfordj Jan 28, 2021
1a0deb1
remove dependabot config from fork
sseago Nov 4, 2022
b27359d
Create Makefile.prow
kaovilai Apr 5, 2023
424d85e
set HOME in velero image for kopia, update controller-gen for CI (#280)
sseago Jul 25, 2023
4c8d5b6
build velero-helper binary for datamover pod
sseago Aug 16, 2023
2944455
restore: Use warning when Create IsAlreadyExist and Get error
kaovilai Oct 23, 2023
d8e6b09
kopia/repository/config/aws.go: Set session.Options profile from config
kaovilai Oct 20, 2023
7568983
use ubi9-latest to build
sseago May 23, 2024
54c9592
OADP-4225: add tzdata to Dockerfile.ubi
sseago Jun 5, 2024
1cdcf58
fix: CI (#316)
Jun 17, 2024
f3655e6
fix: ARM images (#332)
Aug 6, 2024
7c23ecf
ubi: BUILDPLATFORM to build stage to enable cross compile. (#336)
kaovilai Aug 12, 2024
47aa139
OADP-4640: Downstream only to allow override kopia default algorithms…
mpryc Aug 16, 2024
a6af005
Downstream only: Rework of Makefile and incusion of lint
mpryc Sep 4, 2024
6c0755b
Downstream only - fix lint error in downtream change (#343)
mpryc Sep 5, 2024
18e99d1
run oadp-operator e2e test from the velero repo (#353)
weshayutin Oct 17, 2024
f5472a3
DS Owners
kaovilai Mar 13, 2025
8065ebf
updated controller-gen version
sseago Mar 13, 2025
39da040
Include velero-restore-helper binary in velero image (#374)
sseago Apr 1, 2025
b095126
Fix restic checkout in Dockerfile.ubi to get default branch (#436)
sseago Aug 19, 2025
eec869d
UPSTREAM: <drop>: Updating go modules
oadp-maintainers Sep 12, 2025
bc51c3f
UPSTREAM: <drop>: update restic @ 8c4c3fbfe (branch oadp-dev)
oadp-maintainers Sep 12, 2025
c602485
UPSTREAM: <carry> Use context from test for the kopia algorithms
oadp-maintainers Sep 12, 2025
e127cf5
UPSTREAM: <drop>: Updating go modules
oadp-maintainers Feb 12, 2026
8c5ac2e
UPSTREAM: <carry>: Fix golangci-lint configuration for v2.x
mpryc Feb 12, 2026
3e35877
UPSTREAM: <drop>: Fix malformed unicode characters in filenames
oadp-maintainers Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/unreleased/9581-shubham-pampattiwar
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
11 changes: 11 additions & 0 deletions internal/delete/actions/csi/volumesnapshotcontent_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ func (p *volumeSnapshotContentDeleteItemAction) Execute(
return checkVSCReadiness(ctx, &snapCont, p.crClient)
},
); err != nil {
// Clean up the VSC we created since it can't become ready
if deleteErr := p.crClient.Delete(context.TODO(), &snapCont); deleteErr != nil && !apierrors.IsNotFound(deleteErr) {
p.log.WithError(deleteErr).Errorf("Failed to clean up VolumeSnapshotContent %s", snapCont.Name)
}
return errors.Wrapf(err, "fail to wait VolumeSnapshotContent %s becomes ready.", snapCont.Name)
}

Expand Down Expand Up @@ -167,6 +171,13 @@ var checkVSCReadiness = func(
return true, nil
}

// Fail fast on permanent CSI driver errors (e.g., InvalidSnapshot.NotFound)
if tmpVSC.Status != nil && tmpVSC.Status.Error != nil && tmpVSC.Status.Error.Message != nil {
return false, errors.Errorf(
"VolumeSnapshotContent %s has error: %s", vsc.Name, *tmpVSC.Status.Error.Message,
)
}

return false, nil
}

Expand Down
39 changes: 39 additions & 0 deletions internal/delete/actions/csi/volumesnapshotcontent_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ func TestVSCExecute(t *testing.T) {
return false, errors.Errorf("test error case")
},
},
{
name: "Error case with CSI error, dangling VSC should be cleaned up",
vsc: builder.ForVolumeSnapshotContent("bar").ObjectMeta(builder.WithLabelsMap(map[string]string{velerov1api.BackupNameLabel: "backup"})).Status(&snapshotv1api.VolumeSnapshotContentStatus{SnapshotHandle: &snapshotHandleStr}).Result(),
backup: builder.ForBackup("velero", "backup").ObjectMeta(builder.WithAnnotationsMap(map[string]string{velerov1api.ResourceTimeoutAnnotation: "5s"})).Result(),
expectErr: true,
function: func(
ctx context.Context,
vsc *snapshotv1api.VolumeSnapshotContent,
client crclient.Client,
) (bool, error) {
return false, errors.Errorf("VolumeSnapshotContent %s has error: InvalidSnapshot.NotFound", vsc.Name)
},
},
}

for _, test := range tests {
Expand Down Expand Up @@ -190,6 +203,24 @@ func TestCheckVSCReadiness(t *testing.T) {
expectErr: false,
ready: false,
},
{
name: "VSC has error from CSI driver",
vsc: &snapshotv1api.VolumeSnapshotContent{
ObjectMeta: metav1.ObjectMeta{
Name: "vsc-1",
Namespace: "velero",
},
Status: &snapshotv1api.VolumeSnapshotContentStatus{
ReadyToUse: boolPtr(false),
Error: &snapshotv1api.VolumeSnapshotError{
Message: stringPtr("InvalidSnapshot.NotFound: The snapshot 'snap-0abc123' does not exist."),
},
},
},
createVSC: true,
expectErr: true,
ready: false,
},
}

for _, test := range tests {
Expand All @@ -207,3 +238,11 @@ func TestCheckVSCReadiness(t *testing.T) {
})
}
}

func boolPtr(b bool) *bool {
return &b
}

func stringPtr(s string) *string {
return &s
}
90 changes: 0 additions & 90 deletions site/algolia-crawler.json

This file was deleted.

4 changes: 4 additions & 0 deletions site/content/docs/main/api-types/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ spec:
# CSI VolumeSnapshot status turns to ReadyToUse during creation, before
# returning error as timeout. The default value is 10 minute.
csiSnapshotTimeout: 10m
# ItemOperationTimeout specifies the time used to wait for
# asynchronous BackupItemAction operations
# The default value is 4 hour.
itemOperationTimeout: 4h
Comment on lines +66 to +69
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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: 4h

If 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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# ItemOperationTimeout specifies the time used to wait for
# asynchronous BackupItemAction operations
# The default value is 4 hour.
itemOperationTimeout: 4h
# ItemOperationTimeout specifies the time used to wait for
# asynchronous BackupItemAction operations
# The default value is 4 hours.
itemOperationTimeout: 4h
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@site/content/docs/main/api-types/schedule.md` around lines 66 - 69, Update
the grammatical errors in the documentation values: change "The default value is
4 hour." to "The default value is 4 hours." for the itemOperationTimeout entry
(referenced by the symbol itemOperationTimeout) and also change "10 minute" to
"10 minutes" in the related schedule/config entry mentioned earlier (ensure the
corresponding field name remains correct in the same doc), keeping plural
"minutes" and "hours" for the default value descriptions.

# resourcePolicy specifies the referenced resource policies that backup should follow
# optional
resourcePolicy:
Expand Down
20 changes: 0 additions & 20 deletions site/layouts/docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ <h1>Documentation</h1>
<div class="col-md-3 toc">
{{ .Render "versions" }}
<br/>
<div id="docsearch">
<!-- <form class="d-flex align-items-center">
<span class="algolia-autocomplete" style="position: relative; display: inline-block; direction: ltr;">
<input type="search" class="form-control docsearch" id="search-input" placeholder="Search..."
aria-label="Search for..." autocomplete="off" spellcheck="false" role="combobox"
aria-autocomplete="list" aria-expanded="false" aria-owns="algolia-autocomplete-listbox-0"
dir="auto" style="position: relative; vertical-align: top;">
</span>
</form> -->
</div>
{{ .Render "nav" }}
</div>
<div class="col-md-8">
Expand All @@ -58,16 +48,6 @@ <h1>Documentation</h1>
{{ .Render "footer" }}
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script type="text/javascript"> docsearch({
appId: '9ASKQJ1HR3',
apiKey: '170ba79bfa16cebfdf10726ae4771d7e',
indexName: 'velero_new',
container: '#docsearch',
searchParameters: {
facetFilters: ["version:{{ .CurrentSection.Params.version }}"]},
});
</script>
</body>

</html>
2 changes: 0 additions & 2 deletions site/layouts/partials/head-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@
{{ $styles := resources.Get "styles.scss" | toCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
{{/* TODO {% seo %}*/}}
<link rel="preconnect" href="https://9ASKQJ1HR3-dsn.algolia.net" crossorigin />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
</head>
150 changes: 150 additions & 0 deletions test/e2e/basic/restore_exec_hooks.go
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
}
6 changes: 6 additions & 0 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ var _ = Describe(
StorageClasssChangingTest,
)

var _ = Describe(
"Restore phase does not block at Finalizing when a container has multiple exec hooks",
Label("Basic", "Hooks"),
RestoreExecHooksTest,
)

var _ = Describe(
"Backup/restore of 2500 namespaces",
Label("Scale", "LongTime"),
Expand Down