-
Notifications
You must be signed in to change notification settings - Fork 65
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
stub.go calls os.Exit(0) on lost connection #74
Comments
Yes, but only if the plugin does not have an onClose()-handler.
The logic was roughly: If the plugin has an
Hmm... I think we ignore |
The problem here is that you/the current code assumes lost connection is a normal shutdown. |
But is the Unless your plugin is the kind which does unsolicited updates, if you don't register an |
About swallowing |
If your NRI plugin timeouts, containerd will close the connection, and your NRI plugin
os.Exit(0)
without a chance to log anythingnri/pkg/stub/stub.go
Lines 519 to 528 in 53d3371
@klihub do you remember what was the logic behind this ? I don't think libraries should ever call os.Exit()
Also
stub.Run
hidesttrpc.ErrServerClosed
nri/pkg/stub/stub.go
Lines 436 to 450 in 53d3371
Maybe Run(ctx) should only return nil if we call Stop() and/or cancel the context ?
The text was updated successfully, but these errors were encountered: