Make sure the PVs skipped by CSI plugin due to settings in backup spec

are tracked

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
pull/7174/head
Daniel Jiang 2023-12-01 13:46:31 +08:00
parent 5cbfd9fffd
commit 266ea5d55a
1 changed files with 2 additions and 2 deletions

View File

@ -384,8 +384,8 @@ func (ib *itemBackupper) executeActions(
// snapshot was skipped by CSI plugin
ib.trackSkippedPV(obj, groupResource, csiSnapshotApproach, "skipped b/c it's not a CSI volume", log)
delete(u.GetAnnotations(), skippedNoCSIPVAnnotation)
} else if actionName == csiBIAPluginName || actionName == vsphereBIAPluginName {
// the snapshot has been taken
} else if (actionName == csiBIAPluginName || actionName == vsphereBIAPluginName) && !boolptr.IsSetToFalse(ib.backupRequest.Backup.Spec.SnapshotVolumes) {
// the snapshot has been taken by the BIA plugin
ib.unTrackSkippedPV(obj, groupResource, log)
}
mustInclude := u.GetAnnotations()[mustIncludeAdditionalItemAnnotation] == "true" || finalize