zhuqi-lucas commented on PR #896:
URL: https://github.com/apache/yunikorn-k8shim/pull/896#issuecomment-2295174150

   Thanks @craigcondit for review, i think we may need to change both setting 
for pod spec and also the actually deleting settings, and the actually deleting 
settings will be executed. There are two timeout for pod, when we create the 
placeholder pod we set the pod spec timeout to zero now, but when we actually 
delete the pod, the timeout will be potentially override by the for API timeout 
setting:
   
   For creating placeholder, we setting in this code:
   
   
https://github.com/apache/yunikorn-k8shim/blob/2278b3217c702ccb796e4d623bc7837625e5a4ec/pkg/cache/placeholder.go#L124
   
   
   ``` golang
   // Optional duration in seconds the pod needs to terminate gracefully. May 
be decreased in delete request.
        // Value must be non-negative integer. The value zero indicates stop 
immediately via
        // the kill signal (no opportunity to shut down).
        // If this value is nil, the default grace period will be used instead.
        // The grace period is the duration in seconds after the processes 
running in the pod are sent
        // a termination signal and the time when the processes are forcibly 
halted with a kill signal.
        // Set this value longer than the expected cleanup time for your 
process.
        // Defaults to 30 seconds.
        // +optional
        TerminationGracePeriodSeconds *int64 
`json:"terminationGracePeriodSeconds,omitempty" 
protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"`
   ```
   
   Actually pod deletion override code, we will finally call this for all pod 
deletion:
   
https://github.com/apache/yunikorn-k8shim/blob/2278b3217c702ccb796e4d623bc7837625e5a4ec/pkg/client/kubeclient.go#L143
   
   ``` golang
   // The duration in seconds before the object should be deleted. Value must 
be non-negative integer.
        // The value zero indicates delete immediately. If this value is nil, 
the default grace period for the
        // specified type will be used.
        // Defaults to a per object value if not specified. zero means delete 
immediately.
        // +optional
        GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" 
protobuf:"varint,1,opt,name=gracePeriodSeconds"`
   ```
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to