andyhuangdev commented on PR #1074: URL: https://github.com/apache/yunikorn-k8shim/pull/1074#issuecomment-5405819085
@wilfred-s Thanks for the review. I updated `KubernetesShim.Stop()` to: - move the `stopping scheduler` log inside `stopOnce`, so it is only emitted when shutdown work is actually performed; - stop the API factory as part of the scheduler shutdown; - stop components in reverse startup order: API factory, placeholder manager, then dispatcher; - remove the extra `apiProvider.Stop()` call from `MockScheduler.stop()` to avoid a double close in tests. I also added a unit test verifying that stopping the scheduler stops its API provider, and ran the shim shutdown tests with the race detector. I filed the requested follow-up issues for the existing lifecycle races: - PlaceholderManager Start/Stop races: https://issues.apache.org/jira/browse/YUNIKORN-3404 - Dispatcher Start/Stop races: https://issues.apache.org/jira/browse/YUNIKORN-3405 The API factory informer goroutines are still covered by the existing leak exclusions, but the scheduler now correctly releases the API factory resources it owns during shutdown. -- 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]
