INNER CODE UNIT · Go
backupSession
stashed/stash · pkg/backup/backupsession.go:177
backupSession := obj.(*api_v1beta1.BackupSession)
klog.Infof("Sync/Add/Update for Backup Session %s", backupSession.GetName())
inv, err := invoker.NewBackupInvoker(c.StashClient, backupSession.Spec.Invoker.Kind, backupSession.Spec.Invoker.Name, c.Namespace)
if err != nil {
return err
}
for _, targetInfo := range inv.GetTargetInfo() {
if targetInfo.Target != nil && c.targetMatched(targetInfo.Target.Ref) {
// Ensure Execution Order
if inv.GetExecutionOrder() == api_v1beta1.Sequential &&
!inv.NextInOrder(targetInfo.Target.Ref, backupSession.Status.Targets) {
// backup order is sequential and the current target is not yet to be executed.
klog.Infof("Skipping backup. Reason: Backup order is sequential and some previous targets hasn't completed their backup process.")
return nil
}