Skip to content

Commit c20bafc

Browse files
committed
fix conflict
Signed-off-by: Daniil Antoshin <[email protected]>
1 parent e95cdca commit c20bafc

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

images/virtualization-artifact/pkg/controller/service/restorer/restorers/vm_restorer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (v *VirtualMachineHandler) ProcessRestore(ctx context.Context) error {
181181
updErr := v.client.Update(ctx, vm)
182182
if updErr != nil {
183183
if apierrors.IsConflict(updErr) {
184-
return fmt.Errorf("waiting for the `VirtualMachine` %w: %w", common.ErrUpdating, updErr)
184+
return fmt.Errorf("waiting for the `VirtualMachine` %s: %w", vm.Name, common.ErrUpdating)
185185
} else {
186186
return fmt.Errorf("failed to update the `VirtualMachine`: %w", updErr)
187187
}

images/virtualization-artifact/pkg/controller/service/restorer/snapshot_resources.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"fmt"
2323

2424
corev1 "k8s.io/api/core/v1"
25-
apierrors "k8s.io/apimachinery/pkg/api/errors"
2625
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2726
"k8s.io/apimachinery/pkg/types"
2827
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -211,10 +210,6 @@ var RetryErrors = []error{
211210
}
212211

213212
func shouldIgnoreError(mode v1alpha2.VMOPRestoreMode, err error) bool {
214-
if apierrors.IsConflict(err) {
215-
return true
216-
}
217-
218213
switch mode {
219214
case v1alpha2.VMOPRestoreModeDryRun:
220215
for _, e := range DryRunIgnoredErrors {

0 commit comments

Comments
 (0)