Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Conversation

@kimoonkim
Copy link
Member

What changes were proposed in this pull request?

Addresses potentially remaining problems of #143 by explicitly shutting down the log watcher when the launcher completes. The main problem of #143 is fixed by #154, but the symptom may reappear if we fail to detect DELETED events due to upstream k8s client bugs. I think this patch will help in such a case.

cc @ash211 @foxish

How was this patch tested?

Ran integration test. Ran manual tests against the case of #143 before #154 is merged in.

} finally {
kubernetesResourceCleaner.deleteAllRegisteredResourcesFromKubernetes(kubernetesClient)
if (loggingWatch.nonEmpty) {
loggingWatch.get.shutdown()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect close to handle this and that we would catch this since we wrap the call in a `tryWithResource1 - is this not the case?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately right now a Watch's onClose callback doesn't get called -- see fabric8io/kubernetes-client#674

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I think we should prefer fixing what's upstream as opposed to adding to our code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mccheah SGTM. Let me close this PR. We can always revisit when and if there are future issues.

@kimoonkim kimoonkim closed this Feb 28, 2017
@kimoonkim kimoonkim deleted the close-watcher-when-launcher-fail branch February 28, 2017 21:48
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants