Skip to content

Commit 7f0c212

Browse files
weshayutinoadp-maintainers
authored andcommitted
OADP-5952: downstream only, update error message disableFsBackup (openshift#380)
* OADP-5952: clear error for disableFsBackup This error message can be carried in OADP-1.5 Upstream issue: vmware-tanzu#8185 Signed-off-by: Wesley Hayutin <[email protected]> * fix error message and test --------- Signed-off-by: Wesley Hayutin <[email protected]>
1 parent 399e525 commit 7f0c212

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/exposer/host_path.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ func GetPodVolumeHostPath(ctx context.Context, pod *corev1.Pod, volumeName strin
6262

6363
path, err := singlePathMatch(pathGlob, fs, logger)
6464
if err != nil {
65-
return datapath.AccessPoint{}, errors.Wrapf(err, "error identifying unique volume path on host for volume %s in pod %s", volumeName, pod.Name)
65+
return datapath.AccessPoint{}, errors.Wrapf(err, "error identifying unique volume path "+
66+
"on host for volume %s in pod %s, or the DPA spec.configuration.velero.disableFsBackup "+
67+
"is set to true, please contact your administrator. ",
68+
volumeName, pod.Name)
6669
}
6770

6871
logger.WithField("path", path).Info("Found path matching glob")

pkg/exposer/host_path_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestGetPodVolumeHostPath(t *testing.T) {
6565
},
6666
pod: builder.ForPod(velerov1api.DefaultNamespace, "fake-pod-2").Result(),
6767
pvc: "fake-pvc-1",
68-
err: "error identifying unique volume path on host for volume fake-pvc-1 in pod fake-pod-2: fake-error-2",
68+
err: "error identifying unique volume path on host for volume fake-pvc-1 in pod fake-pod-2, or the DPA spec.configuration.velero.disableFsBackup is set to true, please contact your administrator. : fake-error-2",
6969
},
7070
{
7171
name: "get block volume dir success",

0 commit comments

Comments
 (0)