Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controllers/pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
return ctrl.Result{}, nil
}

if r.SchedulerProvider != nil {
if r.SchedulerProvider != nil && strings.Contains(pod.Spec.SchedulerName, string(schedulerprovider.Volcano)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good choice to hard-code it here, I think the main reason in your issue is that, volcano will automatically create podgroups for orphan pods, but you didn't specify schedulerName: volcano in your lws template. I think we'd better automatically inject schedulerName: volcano for lws needs to use volcano as the gang scheduler

err = r.SchedulerProvider.CreatePodGroupIfNotExists(ctx, &leaderWorkerSet, &pod)
if err != nil {
return ctrl.Result{}, err
Expand Down