Shubham Pampattiwar
89e8642d3d
Fix PodVolumeBackup metadata loss on fs-backup timeout ( #9995 )
...
* Fix PodVolumeBackup metadata loss on fs-backup timeout
When a backup hits the fs-backup timeout, WaitAllPodVolumesProcessed
returned nil because PVBs were only collected from the indexer in the
done branch of the select. This discarded all PVB metadata including
already-completed PVBs, making their data unrestorable.
Move the PVB collection loop to run after the select so tracked PVBs
are always persisted regardless of timeout.
Fixes #9986
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
* Add changelog for PR #9995
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
* Filter non-completed PVBs in hasPodVolumeBackup
After preserving tracked PVBs on timeout, non-completed PVBs (in-progress
or with no snapshot ID) would cause hasPodVolumeBackup to return true,
leading the restore to skip the original PV and dynamically re-provision
it without any data to restore from.
Only match PVBs that are Completed with a valid SnapshotID.
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
* Add unit tests for hasPodVolumeBackup phase filtering
Verify that hasPodVolumeBackup only matches PVBs that are Completed
with a valid SnapshotID, and rejects in-progress, failed, or
empty-snapshot PVBs.
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
---------
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
(cherry picked from commit e593ba73f9 )
2026-07-14 09:27:33 -07:00
Xun Jiang/Bruce Jiang and GitHub
25402b6209
[1.18] Deprecate inactive maintained packages ( #9912 )
...
Run the E2E test on kind / get-go-version (push) Successful in 59s
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
Main CI / get-go-version (push) Successful in 14s
Run the E2E test on kind / build (push) Failing after 1m48s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 25s
* Replace github.com/robfig/cron/v3 by github.com/netresearch/go-cron
Replace k8s.io/utils/pointer with k8s.io/utils/ptr
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com >
* Replace gopkg.in/yaml.v3 by go.yaml.in/yaml/v3
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com >
* Replace github.com/joho/godotenv.
Move the needed code into Velero repository.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com >
* Replace github.com/pkg/errors by github.com/cockroachdb/errors
Change errors.Cause to errors.Is, because github.com/cockroachdb/errors
New() function create a error with error stack with depth 1, but
github.com/pkg/errors's New() function create error with no depth.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com >
---------
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com >
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com >
2026-07-10 11:20:34 +08:00
Tiger Kaovilai and Claude Opus 4.5
5b54ccd2e0
Fix VolumePolicy PVC phase condition filter for unbound PVCs
...
Use typed error approach: Make GetPVForPVC return ErrPVNotFoundForPVC
when PV is not expected to be found (unbound PVC), then use errors.Is
to check for this error type. When a matching policy exists (e.g.,
pvcPhase: [Pending, Lost] with action: skip), apply the action without
error. When no policy matches, return the original error to preserve
default behavior.
Changes:
- Add ErrPVNotFoundForPVC sentinel error to pvc_pv.go
- Update ShouldPerformSnapshot to handle unbound PVCs with policies
- Update ShouldPerformFSBackup to handle unbound PVCs with policies
- Update item_backupper.go to handle Lost PVCs in tracking functions
- Remove checkPVCOnlySkip helper (no longer needed)
- Update tests to reflect new behavior
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com >
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-11 15:29:14 -05:00
Lyndon-Li
e4caab4086
support cancel for PVB/PVR in backups/restores
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-06-18 15:58:28 +08:00
Lyndon-Li
749d57db3e
windows support for vgdp ms for pvb
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-06-16 15:27:51 +08:00
Lyndon-Li
c3a8c89ae3
vgdp ms pvb controller
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-06-12 11:30:51 +08:00
Lyndon-Li
99c699fcb1
vgdp ms pvb controller
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-06-11 09:22:43 +00:00
Wenkai Yin(尹文开)
5ba4bd1373
Call WaitGroup.Done() once only when PVB changes to final status the first time to avoid panic
...
Call WaitGroup.Done() once only when PVB changes to final status the first time to avoid
panic
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2025-05-14 17:26:32 +08:00
Wenkai Yin(尹文开)
ee43d040a6
Return directly if no pod volme backup are tracked
...
Return directly if no pod volme backup are tracked
Fixes #8723
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2025-02-27 16:56:03 +08:00
Shubham Pampattiwar and GitHub
0eb1040a0a
Add labels as a criteria for volume policy ( #8713 )
...
Run the E2E test on kind / build (push) Failing after 6m23s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 38s
Close stale issues and PRs / stale (push) Successful in 9s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m5s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 55s
* Add labels as a criteria for volume policy
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
add changelog file
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
handle err
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
use labels selector.matches
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
make update
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
remove fetching pvc from volume policy filtering
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
add more ut coverage
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
* minor updates
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
use VolumeFilterData struct in GetMatchAction func
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
update parsePVC func and add more ut
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
lint fix
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
---------
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
2025-02-26 10:02:45 -05:00
Wenkai Yin(尹文开)
cdcd6eb99d
Fix WaitGroup panic issue
...
Make sure WaitGroup.Add() is called before WaitGroup.Done() to avoid WaitGroup panic issue
Fixes #8657
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2025-02-12 13:56:05 +08:00
Matthieu MOREL
cbba3bdde7
chore: enable use-any from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2025-01-17 07:58:10 +01:00
Wenkai Yin(尹文开)
1f39943291
Check the PVB status via podvolume Backupper rather than calling API server to avoid API server issue
...
Check the PVB status via podvolume Backupper rather than calling API server to avoid API server issue
Fixes #8587
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2025-01-13 12:56:26 +08:00
Lyndon-Li
a711b1067b
fail fs-backup for windows nodes
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2024-12-18 10:46:00 +08:00
Tiger Kaovilai and GitHub
3f9c2dc789
Reduces ~140 indirect imports for plugin/framework importers ( #8208 )
...
* Avoid plugin framework importers from needing cloud provider imports
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com >
2024-09-13 10:21:51 +08:00
Lyndon-Li
fefb4b858c
issue 8072: restic deprecation - warning messages
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2024-08-09 14:40:42 +08:00
Wenkai Yin(尹文开)
8d10b68eda
Improve the concurrency for PVBs in different pods
...
Improve the concurrency for PVBs in different pods
Fixes #6676
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2024-03-29 09:58:50 +08:00
Wenkai Yin(尹文开) and GitHub
79e9e31d8d
Merge pull request #7489 from ywk253100/240229_lib
...
Bump up the versions of several Kubernetes-related libs
2024-03-12 16:12:56 +08:00
Ming Qiu
6e76e03a8b
Adjust resource policies log
...
Signed-off-by: Ming Qiu <mqiu@vmware.com >
2024-03-07 05:43:28 +00:00
Wenkai Yin(尹文开)
8752c3a820
Bump up the versions of severel Kubernetes-related libs
...
Bump up the versions of severel Kubernetes-related libs
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2024-03-05 13:09:38 +08:00
lyndon-li and GitHub
099acd2527
Merge pull request #7141 from qiuming-best/support-restore-sparse
...
Allow sparse option for Kopia & Restic restore
2023-12-06 18:25:34 +08:00
Ming Qiu
1a237d3e4c
Update API
...
Signed-off-by: Ming Qiu <mqiu@vmware.com >
2023-12-06 08:59:12 +00:00
Ming Qiu
0afaa70e9b
Merge branch 'main' of https://github.com/qiuming-best/velero into support-restore-sparse
2023-11-30 10:55:55 +00:00
Lyndon-Li
e416b20148
issue 7135: check pod status before checking node-agent pod status
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2023-11-29 13:46:50 +08:00
Ming Qiu
b57dde1572
Allow sparse option for Kopia & Restic restore
...
Signed-off-by: Ming Qiu <mqiu@vmware.com >
2023-11-28 13:48:09 +00:00
Ming Qiu
fea22bbbc9
Merge branch 'main' of https://github.com/qiuming-best/velero into kopia-parallelism
2023-11-22 01:42:39 +00:00
Xun Jiang
a221a88945
Remove dependency of generated client part 2
...
Remove dependecy of generate client from pkg/cmd/cli/snapshotLocation.
Remove the Velero generated informer from PVB and PVR.
Remove dependency of generated client from pkg/podvolume directory.
Replace generated codec with runtime codec.
Signed-off-by: Xun Jiang <jxun@vmware.com >
2023-11-03 17:11:36 +08:00
Ming
481cb60493
Make Kopia file parallelism configurable
...
Signed-off-by: Ming <mqiu@vmware.com >
2023-10-26 02:28:36 +00:00
Scott Seago
09be1f7995
issue #6807 : Retry failed create when using generateName
...
When creating resources with generateName, apimachinery
does not guarantee uniqueness when it appends the random
suffix to the generateName stub, so if it fails with
already exists error, we need to retry.
Signed-off-by: Scott Seago <sseago@redhat.com >
2023-10-09 17:38:37 -04:00
David Zaninovic and GitHub
8e01d1b9be
Add support for block volumes ( #6680 )
...
Signed-off-by: David Zaninovic <dzaninovic@catalogicsoftware.com >
2023-09-28 09:44:46 -04:00
lyndon and GitHub
73ea00b477
issue 6861: fill repoIdentifier only for restic repo ( #6872 )
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2023-09-27 16:49:35 -04:00
Daniel Jiang and GitHub
2548b20db9
Track the skipped PV in a backup and print the summary in backup log ( #6496 )
...
Partially address the requirements in #5834
Signed-off-by: Daniel Jiang <jiangd@vmware.com >
2023-07-20 16:13:48 +08:00
Tiger Kaovilai
f6cea372fd
log volumes to backup to help debug why IsPodRunning is called.
...
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com >
2023-05-05 13:41:17 -04:00
Xun Jiang
180cc4e31d
Enable linter revive and resolve found errors: part 1
...
Signed-off-by: Xun Jiang <blackpiglet@gmail.com >
2023-04-25 23:15:15 +08:00
Xun Jiang/Bruce Jiang and GitHub
51c67089f5
Merge branch 'main' into linter_staticcheck
...
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com >
2023-04-25 15:49:05 +08:00
Lyndon-Li
d928124b01
fix issue 6182
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2023-04-25 15:00:08 +08:00
Xun Jiang
cb0ada1e1c
Enable staticcheck and resolve found issues.
...
Signed-off-by: Xun Jiang <blackpiglet@gmail.com >
2023-04-25 11:33:40 +08:00
Ming
a3cef5b0d3
Adjust match resource policies
...
Signed-off-by: Ming <mqiu@vmware.com >
2023-03-23 03:48:26 +00:00
qiuming and GitHub
086dbd344f
Handle backup of volume by resource policies ( #5901 )
...
* Handle backup of volume by resource policies
Signed-off-by: Ming <mqiu@vmware.com >
2023-03-21 14:39:25 +08:00
Fish-pro and GitHub
ef05af13bf
Clean up unused variables and functions ( #5818 )
...
Signed-off-by: Fish-pro <zechun.chen@daocloud.io >
2023-02-09 10:53:24 +08:00
Lyndon-Li
5f7f69366c
remove restic from code
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2022-10-13 13:45:32 +08:00
Lyndon-Li
fbb2606102
issue fix 4874 update
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2022-09-13 11:15:52 +08:00
Lyndon-Li
a12024887f
fix issue 4874
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2022-09-07 21:44:45 +08:00
lyndon and GitHub
0282e65221
Kopia Pod Volume Backup/Restore ( #5259 )
...
* kopia pvbr
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2022-09-05 10:29:30 +08:00
Wenkai Yin(尹文开) and GitHub
092fc01e8d
Splic pkg/restic package ( #5143 )
...
This commit splits the pkg/restic package into several packages to support Kopia integration works
Fixes #5055
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com >
2022-08-05 17:15:38 +08:00