Commit Graph

109 Commits

Author SHA1 Message Date
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
Xun Jiang
efb94ae610 Refactor the native snapshot definition code.
Signed-off-by: Xun Jiang <blackpigletbruce@gmail.com>
2024-03-20 15:38:07 +08:00
Shahaf Bahar
36d58943cd Skip pvb creation when pvc excluded
Signed-off-by: Shahaf Bahar <sbahar@redhat.com>
2024-02-27 16:30:29 +08:00
Daniel Jiang
f2ba625229 Merge pull request #7138 from blackpiglet/6595_volumeinfo_restore
Use VolumeInfo to help restore the PV.
2023-12-05 10:19:16 +08:00
Xun Jiang
c77bec73bb Move VolumesInformation to an independant package.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-12-04 08:33:37 +08:00
Xun Jiang
ca97248f2a Use VolumeInfo to help restore the PV.
Add VolumeInfo for left PVs during backup.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-12-04 08:33:37 +08:00
Daniel Jiang
266ea5d55a Make sure the PVs skipped by CSI plugin due to settings in backup spec
are tracked

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-12-01 14:19:54 +08:00
Xun Jiang/Bruce Jiang
f5bbe82e78 Merge pull request #7152 from reasonerjt/track-skipped-SnapshotVolumes-false
Track the skipped PV when SnapshotVolumes set as false
2023-11-29 14:46:23 +08:00
Daniel Jiang
b759877f5b Track the skipped PV when SnapshotVolumes set as false
This commit makes sure if a PV is not taken snapshot b/c the flag
SnapshotVolumes is set to false in a backup CR, the PV is also also
tracked as skipped in the tracker.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-11-28 22:52:17 +08:00
allenxu404
5d1a632be4 Add hook status to backup/restore CR
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-11-28 14:47:31 +08:00
Xun Jiang
7f52321772 Generate VolumeInfo.
Remove CSI VolumeSnapshot listter and the informer.
Add download the VolumeInfos metadata for backup.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-11-22 09:40:38 +08:00
Xun Jiang
908e2c63ba Check whether the action is a CSI action and whether CSI feature is
enabled, before executing the action.

The DeleteItemAction is not checked, because the DIA doesn't have a
method to get the action's plugin name.
This should be OK, because the CSI will check whether the VS and VSC
have a backup name annotation. If the VS and VSC is not handled by
the CSI plugin, then they don't have the annotation.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-10-24 16:54:38 +08:00
Lyndon-Li
2e71cffe0e issue: move plugin depdending podvolume functions to util pkg
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-26 16:39:33 +08:00
Xun Jiang/Bruce Jiang
1777bbe5b4 Add warning log for snapshot data mover fell backup to Velero native snapshot. (#6602)
Enlarge throttle of UT case TestThrottle_ShouldOutput to avoid occasional CI
failure due to timeout caused by test environment's CPU speed

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-08-04 18:09:21 +08:00
Daniel Jiang
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
kayrus
e71ee0cc5f Add support for OpenStack CSI drivers topology keys
Signed-off-by: kayrus <kayrus@users.noreply.github.com>
2023-07-05 17:27:24 +02:00
Peter Pan
a97d01f7e6 Fix the snapshot log wording to be more accurate (#6395)
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2023-06-30 08:14:10 +08:00
Xun Jiang
a5c28ad423 Add warning message for volume snapshotter in data mover case.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-12 17:57:01 +08:00
Xun Jiang/Bruce Jiang
a8a17d725a Merge pull request #6194 from blackpiglet/linter_more
Enable more linters, and remove mal-functioned milestoned issue action.
2023-04-26 14:12:47 +08:00
Xun Jiang
443f732e51 Enable more linters, and remove mal-functioned milestoned issue action.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 23:31:51 +08: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
1fd28e8a36 Fix usestdlibvars and whitespace linters issues. (#6162)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-24 09:10:55 +08:00
Daniel Jiang
95c674b23a Refine the log message when BIA is skipped
The log message should be clarified, otherwise when a user chooses to do
the backup via podvolme there will be confusing logs, but actually it's
just skipping the BIA for CSI plugin.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-04-02 23:31:19 +08:00
Ming
83f176e4ac Fix resource policies not work for vSphere plugin
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-29 04:14:34 +00:00
Daniel Jiang
82358666c8 Merge pull request #6009 from qiuming-best/resource-policies
Adjust match resource policies
2023-03-24 10:48:50 +08:00
Ming
a3cef5b0d3 Adjust match resource policies
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-23 03:48:26 +00:00
Scott Seago
433d2d5e57 BIA/RIAv2 -- distinguish between New and InProgress operations
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-21 18:55:59 -04:00
qiuming
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
lyndon
81bee240fe Merge pull request #5982 from qiuming-best/fix-empty-volume-id
Fix take snapshot for PV with empty volume ID
2023-03-20 16:33:49 +08:00
Ming
10ae2b3e3a Fix take snapshot for PV without volume ID
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-20 06:38:16 +00:00
Xun Jiang
a1e4f54488 Add new resource filters can separate cluster and namespace scope resources.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-14 07:07:22 +00:00
Scott Seago
dd63e8182c Follow-on fixes for BIAv2 controller work
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-13 10:29:36 -04:00
Scott Seago
c3d1d83da5 BIAv2 async operations controller work
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-01 11:49:17 -05:00
Lyndon-Li
08b8498afb fix issue 5881
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-02-21 19:17:38 +08:00
Lyndon-Li
2c4cfe5611 Merge branch 'main' into issue-fix-5458 2023-01-16 17:46:58 +08:00
Scott Seago
9a54142257 BackupItemAction v2 API implementation
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-01-09 18:36:47 -05:00
Lyndon-Li
b51a17138e fix issue 5458
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-12-01 15:12:07 +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
Daniel Jiang
28c543a9ec Skip the exclusion check for additional resources returned by BIA
This commit provides a simple contract that if the BackupItemAction
plugin sets an annotation in a resource it has handled, the additional
items will considered "must include" i.e. each of them will skip the
"include-exclude" filter, such that the plugin developer can make sure
they are included in the backup disregarding the filter setting in the
bakcup CR.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-10-11 12:03:44 +08:00
Xun Jiang/Bruce Jiang
b7f5cbd0c0 Merge pull request #5318 from sseago/volumesnapshotter-refactor
plugin versioning v1 refactor for VolumeSnapshotter
2022-09-23 09:54:01 +08:00
lyndon
c81f0db886 rename pvbr param (#5370)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-23 09:13:36 +08:00
Scott Seago
b6088356e6 plugin versioning v1 refactor for VolumeSnapshotter
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-21 13:47:23 -04:00
Wenkai Yin(尹文开)
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
niulechuan
fb897471c0 Move 'velero.io/exclude-from-backup' label string to const (#5053)
* move 'velero.io/exclude-from-backup' label name to const

Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>

* add changelog file (in changelogs/unreleased) of this PR

Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-07-04 14:31:20 +08:00
Xun Jiang
5c74aa22e6 Avoid duplicated snapshotting, when CSI is enabled
Fix #4758

Do not take snapshot for PV to avoid duplicated snapshotting, when CSI feature is enabled.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-07 23:32:48 +08:00
Xun Jiang
4c8d1c2693 Modify according to comments
1. rename zoneSeparator to gkeZoneSeparator
2. add example of regional PV's node affinity. modify test case description.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-22 16:23:10 +08:00
Xun Jiang
7be12a9220 [fix] Add regional PV support for GKE
fix #4663.
For GKE pv, when create backup, return all zones retrived from node affinity.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-21 22:04:21 +08:00
David L. Smith-Uchida
5677e04bb1 Consolidated code for resolving actions and plugins into ActionResolver (#4410)
* Consolidated code for resolving actions and plugins into ActionResolver.  Added BackupWithResolvers and
RestoreWithResolvers.  Introduces ItemSnapshooterResolver to bring ItemSnapshotter plugins into backup and
restore.  ItemSnapshotters are not used yet.

Added action_resolver_test

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Addressed review comments

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-12-10 12:53:47 -05:00
Daniel Jiang
748cf86aa7 Add the key for GKE zone for AZ collection
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-11-20 15:58:31 +08:00
Daniel Jiang
5878a52843 Read Availability zone from nodeAffinity requirements
Velero to read the AZ info from `NodeAffinity` of a PV when it's taking
the snapshot.

Fixes #4332

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-11-16 09:44:12 +08:00