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>pull/6632/head
parent
d027a1641d
commit
1777bbe5b4
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue