Add warning log for snapshot data mover fell backup to Velero native snapshot. (#6602)

Enlarge throttle of UT case TestThrottle_ShouldOutput to avoid occasional CI
failure due to timeout caused by test environment's CPU speed

Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
Xun Jiang/Bruce Jiang
2023-08-04 18:09:21 +08:00
committed by GitHub
parent d027a1641d
commit 1777bbe5b4
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -525,6 +525,11 @@ func (ib *itemBackupper) takePVSnapshot(obj runtime.Unstructured, log logrus.Fie
// After that, this warning can be removed.
if boolptr.IsSetToTrue(ib.backupRequest.Spec.SnapshotMoveData) {
log.Warnf("VolumeSnapshotter plugin doesn't support data movement.")
if features.IsEnabled(velerov1api.CSIFeatureFlag) && pv.Spec.CSI == nil {
log.Warn("Cannot use CSI data mover to handle PV, because PV doesn't contain CSI in spec.",
" Fall back to Velero native snapshot.")
}
}
if ib.backupRequest.ResPolicies != nil {
+1 -1
View File
@@ -37,7 +37,7 @@ func TestThrottle_ShouldOutput(t *testing.T) {
expectedOutput bool
}{
{interval: time.Second, expectedOutput: true},
{interval: time.Second, throttle: time.Now().UnixNano() + int64(time.Nanosecond*10000), expectedOutput: false},
{interval: time.Second, throttle: time.Now().UnixNano() + int64(time.Nanosecond*100000000), expectedOutput: false},
}
p := new(Progress)
for _, tc := range testCases {