yangwwei commented on a change in pull request #245:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/245#discussion_r597415471
##########
File path: pkg/cache/application.go
##########
@@ -507,6 +508,19 @@ func (app *Application)
handleCompleteApplicationEvent(event *fsm.Event) {
// TODO app lifecycle updates
}
+func (app *Application) handleFailApplicationEvent(event *fsm.Event) {
+ // unallocated task states include New, Pending and Scheduling
+ unalloc := app.getTasks(events.States().Task.New)
+ unalloc = append(unalloc, app.getTasks(events.States().Task.Pending)...)
+ unalloc = append(unalloc,
app.getTasks(events.States().Task.Scheduling)...)
+ // publish pod level event to unallocated pods
+ for _, task := range unalloc {
+ events.GetRecorder().Eventf(task.GetTaskPod(),
v1.EventTypeWarning, "ApplicationFailed",
Review comment:
We need to print the message about this failed app, otherwise, users
will be confused about what happened.
This can get via `si.UpdatedApplication.Message`, so in the
`scheduler_callback.go`, we need to add that in the FailApplication event as
well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]