Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sends CWL tool logging to calrissian debug / stderr #59

Merged
merged 15 commits into from
Mar 14, 2019

Conversation

dleehr
Copy link
Member

@dleehr dleehr commented Mar 14, 2019

  • After submitting a pod, follows stream of logs using read_namespaced_pod_log()
  • Sends log lines to log.debug(), prefixed with the name of the pod in square brackets
  • Also fixes a couple of stray test bugs found along the way

Fixes #17

@dleehr dleehr requested a review from johnbradley March 14, 2019 19:05
continue
elif self.state_is_running(status.state):
# Can only get logs once container is running
self.follow_logs() # This will not return until pod completes
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this introduce a starvation scenario? If for example we are running multiple pods, and we happen to be reading logs from a pod that takes a really long time to complete. When we could be starting subsequent pods we will be busy streaming logs.
Not sure of a good way to avoid this outside of only sending logs back once a pod is completed.

Copy link
Member Author

Choose a reason for hiding this comment

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

No. A KubernetesClient object only manages a single pod. So in your example of running multiple concurrent steps, there are multiple instances of KubernetesClient on different threads tracking those pods.

Copy link
Contributor

@johnbradley johnbradley left a comment

Choose a reason for hiding this comment

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

LGTM

@dleehr
Copy link
Member Author

dleehr commented Mar 14, 2019

I'm seeing an issue here where the log gets truncated. Not sure if it's a connection timeout or what. Seems to happen after 60 minutes. I'll merge and release this but follow-up with an issue.

@johnbradley
Copy link
Contributor

Seems to happen after 60 minutes

This might be due to log rotation:
https://kubernetes.io/docs/concepts/cluster-administration/logging/#logging-at-the-node-level

@dleehr
Copy link
Member Author

dleehr commented Mar 14, 2019

Thanks for the tip @johnbradley !

@dleehr dleehr deleted the 17-capture-pod-logs branch March 14, 2019 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up logging and output from pods and calrissian process
2 participants