Skip to content
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

Merged

Conversation

mateusoliveira43
Copy link
Contributor

@mateusoliveira43 mateusoliveira43 commented Sep 27, 2023

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:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@mateusoliveira43
Copy link
Contributor Author

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #6882 (42eb4fe) into main (563f1cc) will decrease coverage by 0.10%.
Report is 12 commits behind head on main.
The diff coverage is n/a.

@@            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     

see 18 files with indirect coverage changes

@@ -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.
Copy link
Contributor

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".

Copy link
Contributor Author

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).

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@sseago sseago Sep 29, 2023

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks.

@mateusoliveira43 mateusoliveira43 changed the title doc: Alert that plugins run as binaries when turning on debug logs doc: Alert that plugins run as separate processes, when turning on debug logs Sep 29, 2023
sseago
sseago previously approved these changes Sep 29, 2023
@sseago sseago merged commit 1c1054d into vmware-tanzu:main Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants