Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ebs br: fail delete cr operation if backup meta is missing #5199

Merged
Merged
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions cmd/backup-manager/app/clean/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ func (bo *Options) deleteSnapshotsAndBackupMeta(ctx context.Context, backup *v1a
}()

contents, err := os.ReadFile(metaFile)

if errors.Is(err, os.ErrNotExist) {
klog.Warningf("read metadata file %s failed, err: %s, a mannual check or delete aciton require.", metaFile, err)
return nil
klog.Errorf("read metadata file %s failed, err: %s, a manual check or delete action required.", metaFile, err)
return err
} else if err != nil { // will retry it
klog.Warningf("read metadata file %s failed, err: %s", metaFile, err)
klog.Errorf("read metadata file %s failed, err: %s", metaFile, err)
return err
}

Expand Down
Loading