-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix #35 'kubectl logs -f' implemented #39
Fix #35 'kubectl logs -f' implemented #39
Conversation
Tested case: 1h walltime of a unlimited sleep job, with following logs. The exit code is written from job exit code, instead of being written from script:
If we read the logs again (
|
Test case: delete a pod with multiple following logs Also InterLink Slurm Plugin logs shows the first attempt of rmdir fails, we wait for logs to close the logs files, then the second attempt of rmdir works.
|
TODO for later: when doing Ctrl+C to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @antoinetran ! Looks good, I have just a couple of comments that I put inline!
Then I'll going to merge this into main and give it a try before creating a release
b8f69a6
to
5880378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tests are good although failing for independent reasons
Summary
Implement
kubectl logs -f
in InterLink Slurm Plugin side. Also added sessionContext (eg:GetLogs#12345
) is created and added in HTTP header, so that we can also follow the HTTP request from VK to API to Plugin with the same id.This will, in following mode, reads the container log continously with a buffer. It will sleep a 4s hard-coded period of time, to avoid stressing the file-system. It only ends if:
states=all
) and getStatus based on container.status is not reliable #37 too to get exit code. In fact, maybe we can also completely remove the exit code written from script job, and only rely on asking slurm job exit code, and write it.Related issue :
interTwin-eu/interLink#332
#35
#37
#38