Use named pipes for shim logs#2631
Conversation
|
some packages on github are having some issues right now, i'm looking into the CI issues |
|
@danail-branekov for v2. You can use it via |
My question was more about how to test v2 in an automated manner. Is that possible? |
|
Ahh, the CI does run both runtimes. You should be able to set |
0259464 to
505d8ce
Compare
1b508ba to
74bbef0
Compare
|
I have rebased the PR onto master and made the There are however some discrepancies between v1 and v2 logging:
Do we need need to address these discrepancies and always put files in either |
|
@danail-branekov ya, i see what you are talking about. Let me look at the code again and see what would be a good solution. Also don't worry about the windows tests, we have a PR to fix the gcc issue that poped up over night. |
74bbef0 to
bd89495
Compare
|
V2 shim logging is done via a |
|
@jterry75 Actually, v2 would forward stderr to the named pipe and would use stdout to return the shim address. This PR does pretty much the same for v1, except that the PR would forward both stdout and stderr to named pipes. |
|
@crosbymichael Has that GCC windows issue been resolved? If so we can force push to our fork to trigger CI again. |
|
@BooleanCat - Yes it has been fixed for some time now. |
bd89495 to
f7631f9
Compare
f7631f9 to
d664ccb
Compare
|
@danail-branekov We tried rebasing on master and we still need windows failures. Let's take a deeper look at this. |
272de00 to
0fa0a9c
Compare
Relating to issue [containerd#2606](containerd#2606) Co-authored-by: Oliver Stenbom <ostenbom@pivotal.io> Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com> Co-authored-by: Giuseppe Capizzi <gcapizzi@pivotal.io> Co-authored-by: Danail Branekov <danailster@gmail.com> Signed-off-by: Oliver Stenbom <ostenbom@pivotal.io> Signed-off-by: Georgi Sabev <georgethebeatle@gmail.com> Signed-off-by: Giuseppe Capizzi <gcapizzi@pivotal.io> Signed-off-by: Danail Branekov <danailster@gmail.com>
0fa0a9c to
1d4105c
Compare
Codecov Report
@@ Coverage Diff @@
## master #2631 +/- ##
=======================================
Coverage 43.72% 43.72%
=======================================
Files 100 100
Lines 10734 10734
=======================================
Hits 4693 4693
Misses 5311 5311
Partials 730 730
Continue to review full report at Codecov.
|
|
The windows failures were because we introduced a file with unix imports and had not disabled the build on windows ( bump @crosbymichael |
|
Thanks, I'll review this today |
|
LGTM |
|
/poke Any thoughts on this? We'd like to get this merged before it gets stale. |
|
LGTM |
Closes #2606
When waiting for a golang cmd to exit, golang will block exiting on all of its process streams being closed. Currently, the containerd server is configuring each shim processes output (stdout/stderr) to redirect to the server’s stdout/stderr. When running the containerd restart tests, these do not get closed - and waiting for the server process to finish hangs.
Since restarting the containerd server does not restart the shim processes, the shims output streams could still be outputting logs, never to be closed. The aim of this PR is to let the shim instead log to named pipes.
nili.e. the server does not capture shim logsIn order to be able to test the change we:
TestMainata race. Therefore we sent the server output to a temporary file which tests can use to check the output without data races.
We noticed that there is something similar implemented for v2, however we do not really understand how to use and run tests against it. It seems in v2, it creates a single pipe for both stdout and stderr rather than one for each stream and the server does not reconnect to those pipes when restoring running tasks. We could fix it for v2 if we knew how!
cc @ostenbom