-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: fix issue #1723 about spark-operator not working with volcano on OCP #1724
Conversation
… OCP Signed-off-by: disaster37 <linuxworkgroup@hotmail.com>
Hi, @liyinan926 , any chance for reviewing this PR? |
var ( | ||
err error | ||
pg *v1beta1.PodGroup | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't seem necessary given that pg
is not used outside the if-else scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum I remeber why I add this. It's because without that, you init new err on if. So on line 154 (inside if)
_, err = v.volcanoClient.SchedulingV1beta1().PodGroups(app.Namespace).Create(context.TODO(), &podGroup, metav1.CreateOptions{})
The err can't be used outside of if / else and so it never returned by
if err != nil {
return fmt.Errorf("failed to sync PodGroup with error: %s. Abandon schedule pods via volcano", err)
}
So:
- stay my code like this, or add err handler on if like this
if _, err = v.volcanoClient.SchedulingV1beta1().PodGroups(app.Namespace).Create(context.TODO(), &podGroup, metav1.CreateOptions{}); err != nil {
return fmt.Errorf("failed to sync PodGroup with error: %s. Abandon schedule pods via volcano", err)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you prefer ?
@disaster37 @liyinan926 Thanks for taking a look! |
…lcano on OCP (kubeflow#1724) * fix: fix issue kubeflow#1723 about spark-operator not working with volcano on OCP Signed-off-by: disaster37 <linuxworkgroup@hotmail.com> * Update volcano_scheduler.go --------- Signed-off-by: disaster37 <linuxworkgroup@hotmail.com> Signed-off-by: Peter McClonski <mcclonski_peter@bah.com>
…lcano on OCP (kubeflow#1724) * fix: fix issue kubeflow#1723 about spark-operator not working with volcano on OCP Signed-off-by: disaster37 <linuxworkgroup@hotmail.com> * Update volcano_scheduler.go --------- Signed-off-by: disaster37 <linuxworkgroup@hotmail.com>
…lcano on OCP (kubeflow#1724) * fix: fix issue kubeflow#1723 about spark-operator not working with volcano on OCP Signed-off-by: disaster37 <linuxworkgroup@hotmail.com> * Update volcano_scheduler.go --------- Signed-off-by: disaster37 <linuxworkgroup@hotmail.com>
Fix issue #1723
We fix some parts of code:
It fix error on OCP