yangwwei commented on a change in pull request #231:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/231#discussion_r589638890
##########
File path: pkg/callback/scheduler_callback.go
##########
@@ -139,6 +150,10 @@ func (callback *AsyncRMCallback)
RecvUpdateResponse(response *si.UpdateResponse)
log.Logger().Error("failed to delete
application", zap.Error(err))
}
} else {
+ if updated.State == events.States().Application.Killed {
+ ev :=
cache.NewFailApplicationEvent(updated.ApplicationID)
+ dispatcher.Dispatch(ev)
+ }
Review comment:
When we fail an application, we need to expose some pod level events to
indicate this issue.
we can do this in a follow up JIRA.
##########
File path: pkg/common/constants/constants.go
##########
@@ -50,11 +50,14 @@ const SchedulerName = "yunikorn"
// Application crd
const AppManagerHandlerName = "yunikorn-app"
-const AnnotationPlaceholderFlag = "yunikorn.apache.org/placeholder"
-const AnnotationTaskGroupName = "yunikorn.apache.org/task-group-name"
-const AnnotationTaskGroups = "yunikorn.apache.org/task-groups"
// Gang scheduling
const PlaceholderContainerImage = "k8s.gcr.io/pause"
const PlaceholderContainerName = "pause"
const PlaceholderPodRestartPolicy = "Never"
+const AnnotationPlaceholderFlag = "yunikorn.apache.org/placeholder"
+const AnnotationTaskGroupName = "yunikorn.apache.org/task-group-name"
+const AnnotationTaskGroups = "yunikorn.apache.org/task-groups"
+const AnnotationSchedulingPolicyParam =
"yunikorn.apache.org/schedulingPolicyParameters"
+const SchedulingPolicyTimeoutParam = "placeholderTimeout"
Review comment:
Looks like it implies the unit for `placeholderTimeout` is seconds, I
think we should have this declared explicitly in the parameter, otherwise, we
will need additional docs to explain the format. Suggest to rename this to
`placeholderTimeoutInSeconds`
----------------------------------------------------------------
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]