-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add more information for failing to get path or snapshot in restic ba… #4988
Add more information for failing to get path or snapshot in restic ba… #4988
Conversation
…ckup and restore. Signed-off-by: Xun Jiang <jxun@vmware.com>
8977223
to
806234e
Compare
Codecov Report
@@ Coverage Diff @@
## main #4988 +/- ##
==========================================
- Coverage 41.34% 41.30% -0.05%
==========================================
Files 210 210
Lines 18435 18435
==========================================
- Hits 7622 7614 -8
- Misses 10241 10248 +7
- Partials 572 573 +1
Continue to review full report at Codecov.
|
@@ -211,7 +211,7 @@ func (r *PodVolumeBackupReconciler) singlePathMatch(path string) (string, error) | |||
} | |||
|
|||
if len(matches) != 1 { | |||
return "", errors.Errorf("expected one matching path, got %d", len(matches)) | |||
return "", errors.Errorf("expected one matching path: %s, got %d", path, len(matches)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked the value of path
I recall it has the wildcard, what does it look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
volDir, err := kube.GetVolumeDirectory(ctx, log, pod, pvb.Spec.Volume, r.Client)
if err != nil {
return nil, errors.Wrap(err, "getting volume directory name")
}
pathGlob := fmt.Sprintf("/host_pods/%s/volumes/*/%s", string(pvb.Spec.Pod.UID), volDir)
log.WithField("pathGlob", pathGlob).Debug("Looking for path matching glob")
This is the code in PVB controller preparing path before calling the function singlePathMatch.
It has a wildcard, but the volumeDir is also included.
…ckup and restore.
Signed-off-by: Xun Jiang jxun@vmware.com
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.