Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix synchronous pvc/pv bind error when volcano schedule pod with pvc #2844

Merged

Conversation

gj409237405
Copy link
Contributor

@gj409237405 gj409237405 commented May 22, 2023

this pr solve #2843

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 22, 2023
return
}
bindTasks := make([]*schedulingapi.TaskInfo, len(successfulTasks))
copy(bindTasks, successfulTasks)
Copy link
Contributor

@xiao-jay xiao-jay May 23, 2023

Choose a reason for hiding this comment

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

Please replace the extra tab with two spaces, which may be better,because the tab size settings vary among different editors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I should have solved this problem 。

Copy link

Choose a reason for hiding this comment

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

Please replace the extra tab with two spaces, which may be better,because the tab size settings vary among different editors

volcano uses tabs if you take a close look at the code🤣

@gj409237405 gj409237405 force-pushed the fixSynchronousBindError branch 2 times, most recently from a2c5a5c to 2e10433 Compare May 23, 2023 02:47
sc.VolumeBinder.RevertVolumes(task, task.PodVolumes)
sc.resyncTask(task)
}
func (sc *SchedulerCache) Bind(taskArray []*schedulingapi.TaskInfo) error {
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for Volcano's original asynchronous binding, performance?
Does the modification to synchronous have any impact on performance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,here The reason which change asynchronous to synchronous is I have move the asynchronous to above little , so here is not need

@gj409237405 gj409237405 force-pushed the fixSynchronousBindError branch 8 times, most recently from 4fec262 to f6098be Compare May 25, 2023 05:43
} else {
successfulTasks = append(successfulTasks, task)
klog.V(5).Infof("task %s/%s bind Volumes done", task.Namespace, task.Name)
func (sc *SchedulerCache) BindTask(bindCache []*schedulingapi.TaskInfo) {
Copy link
Member

Choose a reason for hiding this comment

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

why we have to add bindcache parameter.

@william-wang
Copy link
Member

@gj199575 please enable the batch bind and have a test.

klog.V(5).Infof("batch bind task count %d", len(bindCache))
var tmpBindCache []*schedulingapi.TaskInfo = make([]*schedulingapi.TaskInfo, len(bindCache))
copy(tmpBindCache, bindCache)
go func(bindCacheParam []*schedulingapi.TaskInfo, sc *SchedulerCache) {
Copy link
Member

Choose a reason for hiding this comment

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

suggest change bindCacheParam to tasks

Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2023
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2023
@volcano-sh-bot volcano-sh-bot merged commit 7a5d24e into volcano-sh:master May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants