Fix API forward events for shims#3204
Conversation
Signed-off-by: Michael Crosby <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #3204 +/- ##
==========================================
- Coverage 45.19% 45.16% -0.04%
==========================================
Files 111 111
Lines 12009 12017 +8
==========================================
Hits 5428 5428
- Misses 5746 5754 +8
Partials 835 835
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3204 +/- ##
=========================================
- Coverage 45.14% 44.85% -0.3%
=========================================
Files 111 113 +2
Lines 12024 12102 +78
=========================================
Hits 5428 5428
- Misses 5761 5839 +78
Partials 835 835
Continue to review full report at Codecov.
|
25c14ed to
231543d
Compare
Shims no longer call `os.Exit` but close the context on shutdown so that events and other resources have hit the `defer`s. Signed-off-by: Michael Crosby <[email protected]>
231543d to
ae87730
Compare
Random-Liu
left a comment
There was a problem hiding this comment.
It's the other way. I see.
|
I just hit an issue in shim v1 that I only see I think it is just that the shim process is killed before This PR should make it better for shim v2 with graceful shim termination, but we definitely shouldn't continue relying on Filed containerd/cri#1132 and will try to address it as soon as possible. |
|
@crosbymichael Found another issue when working on #3199. The shim cleanup in The problem is that the task service is started before the event grpc service. |
|
@Random-Liu ok, i know what the issue is. |
Signed-off-by: Michael Crosby <[email protected]>
b08cf97 to
047348e
Compare
| } | ||
|
|
||
| func (l *remoteEventsPublisher) Publish(ctx context.Context, topic string, event events.Event) error { | ||
| client, err := l.dialer.Get() |
There was a problem hiding this comment.
So event publish will fail if ttrpc event service is not up yet?
#3193 will probably be able to cover that.
|
Verified that #3204 (comment) is fixed. However, event publish may still fail before event ttrpc server comes up. The chance should be slim, and retry introduced in #3193 should be able to cover most cases. And going through all these, I'm 100% sure that we won't rely on events in the CRI plugin any more. :P |
|
LGTM |
Fixes #3203
Signed-off-by: Michael Crosby [email protected]