Skip to content

Commit d676433

Browse files
authored
fix(images): disable false positive error logs about not ready datasource (#1050)
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
1 parent ba22f1b commit d676433

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func (ds ObjectRefDataSource) Validate(ctx context.Context, cvi *virtv2.ClusterV
368368
}
369369

370370
if vdSnapshot == nil {
371-
return fmt.Errorf("VDSnapshot object ref %s is nil", vdSnapshotKey)
371+
return NewVirtualDiskSnapshotNotReadyError(cvi.Spec.DataSource.ObjectRef.Name)
372372
}
373373

374374
return ds.vdSnapshotSyncer.Validate(ctx, cvi)

images/virtualization-artifact/pkg/controller/vi/internal/source/object_ref.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ func (ds ObjectRefDataSource) Validate(ctx context.Context, vi *virtv2.VirtualIm
501501
}
502502

503503
if viRef == nil {
504-
return fmt.Errorf("VI object ref source %s is nil", vi.Spec.DataSource.ObjectRef.Name)
504+
return NewImageNotReadyError(vi.Spec.DataSource.ObjectRef.Name)
505505
}
506506

507507
if viRef.Spec.Storage == virtv2.StorageKubernetes || viRef.Spec.Storage == virtv2.StoragePersistentVolumeClaim {

tests/e2e/default_config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ logFilter:
4242
- "Server rejected event (will not retry!)" # Msg.
4343
- "validation failed for data source objectref" # Err.
4444
- "clean up failed for data source registry" # Err.
45-
- "VDSnapshot object ref" # Err.
46-
- "VirtualDiskSnapshot " # Err.
47-
- "VI object ref source " # Err.
4845
- "the server rejected our request due to an error in our request" # Err.
4946
- "failed to sync powerstate" # Msg.
5047
- "failed to sync virtual disk data source objectref" # "err": "failed to sync virtual disk data source objectref: admission webhook \"datavolume-validate.cdi.kubevirt.io\" denied the request: Destination PVC winwin/vd-win2022-8a136ef9-32d9-4ae3-a27f-e42e15c15f47 already exists"

0 commit comments

Comments
 (0)