Commit b17e7677 authored by Vasilis Katopodis's avatar Vasilis Katopodis
Browse files

fix: record bundle placements when scheduling ends with a warning

parent 4b018a0b
Loading
Loading
Loading
Loading
Loading
+4 −1
Changes for src/ocm_scheduler_operator/internal/controller/hyposchedulingmanifest_controller.go: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -577,6 +577,10 @@ func (r *HypoSchedulingManifestReconciler) Reconcile(ctx context.Context, req ct
		}
	}

	// Record where each bundle was placed, whatever final status follows
	// the next reconciliation needs it to delete the ManifestWork of a bundle that moves to another cluster
	r.Bundles[hypoSchedulingManifest.Name] = bundles

	connections, err := r.getNetworkConnections(bundles)
	if err != nil {
		log.Error(err, "Error occurred while retrieving network connections")
@@ -659,7 +663,6 @@ func (r *HypoSchedulingManifestReconciler) Reconcile(ctx context.Context, req ct
		return ctrl.Result{}, fmt.Errorf("%w", err)
	}

	r.Bundles[hypoSchedulingManifest.Name] = bundles
	log.Info("Reconciliation complete")
	return ctrl.Result{}, nil
}