Skip to content

Boundary Condition Considerations in Gang Plugin's OnSessionClose #4011

@Wang-Kai

Description

@Wang-Kai

What is the problem you're trying to solve

The Gang Plugin's OnSessionClose updates the conditions of the PodGroup (PG) based on whether the current scheduling Job is Ready. In certain scenarios, I believe this behavior is unnecessary.

Scenario:
When a Volcano Job (VJ) is deleted, the PodGroup (PG) and Pods are cascadingly deleted. Since the Pod deletion event is observed earlier than the PG deletion event, vj.pg != nil while len(vj.tasks) == 0 at this point. This causes the Gang Plugin to unnecessarily update the PG conditions in this scenario.

Describe the solution you'd like

Proposed Improvement:
The fundamental premise of Gang scheduling is that there is at least one Pod to schedule. If vj.tasks is empty (i.e., no tasks require scheduling), the plugin should skip updating the PG conditions.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/performanceIssues or PRs related to performancekind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions