-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
doc: Alert that plugins run as separate processes, when turning on debug logs #6882
doc: Alert that plugins run as separate processes, when turning on debug logs #6882
Conversation
Signed-off-by: Mateus Oliveira <[email protected]>
/kind changelog-not-required |
Codecov Report
@@ Coverage Diff @@
## main #6882 +/- ##
==========================================
- Coverage 60.76% 60.67% -0.10%
==========================================
Files 247 249 +2
Lines 26306 26476 +170
==========================================
+ Hits 15985 16064 +79
- Misses 9186 9268 +82
- Partials 1135 1144 +9 |
…logs Signed-off-by: Mateus Oliveira <[email protected]>
@@ -46,6 +46,8 @@ kubectl edit deployment/velero -n velero | |||
... | |||
``` | |||
|
|||
**Note:** Velero plugins run as binaries, i.e. after they are executed, either successful or not, they exit. So, if you see **received EOF, stopping recv loop** messages in debug logs, that does not mean an error occurred, just that a plugin finished executing. |
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.
Are we really sure that this error is benign? My understanding is that Velero server process starts each plugin as a separate process when it comes up and the plug-in processes keep running. If they exit, it must be due to some problem. But it is possible I am missing something here and it will be great if some one clarifies the exact lifecycle of plugin processes.
BTW, "plugins run as separate processes" is preferable to "run as binaries".
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.
I will make that change in the next commit, thanks
As an example, every minute Velero checks if Backup Storage Location is available (marking as valid, invalid or unknown). Each time it finishes the check, you are able to see this message (if log level is debug).
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.
Interesting. @sseago @shubham-pampattiwar Can you please shed some light on how Velero starts plug-ins? I think it uses https://github.com/hashicorp/go-plugin and I thought that the plug-in gRPC server will be up and running all the the time just like Velero server. But it doesn't seem to be the case?
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.
You are correct @draghuram, the exactly line the message is triggered https://github.com/hashicorp/go-plugin/blob/c57883964917bfb33721f5c5c5c8eeb98fe933e7/grpc_stdio.go#L142
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.
@draghuram In my experience, when turning Debug on, we see these plugin process exit messages after a reconcile. So for BSL validation, it exits after checking once. For running a backup, all of the plugin invocations for a given BackupItemAction plugin are invoked on the same plugin process, but once backup processing completes, the plugin exits.
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.
Got it, thanks.
…logs Signed-off-by: Mateus Oliveira <[email protected]>
…logs Signed-off-by: Mateus Oliveira <[email protected]>
Thank you for contributing to Velero!
Please add a summary of your change
Add alert in docs about plugins behaviors. This already has come up mistakenly in an issue #5115
Also, this has been already explained in some issues:
Does your change fix a particular issue?
No
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.