-
Notifications
You must be signed in to change notification settings - Fork 372
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
Add API for uploading logs via host plugin #1902
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1902 +/- ##
===========================================
+ Coverage 69.59% 69.63% +0.04%
===========================================
Files 85 85
Lines 11993 12024 +31
Branches 1676 1680 +4
===========================================
+ Hits 8346 8373 +27
- Misses 3273 3275 +2
- Partials 374 376 +2
Continue to review full report at Codecov.
|
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.
left some comments
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.
left some comments; thanks for the improvements in mock_wire_protocol, etc
raise NotImplementedError("Unimplemented") | ||
""" | ||
Try to upload VM logs, a compressed zip file, via the host plugin /vmAgentLog channel. | ||
:param content: the binary content of the zip file to upload |
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.
wow, so the host ga plugin requires to load the whole file to memory? what is the max size of the zip, again?
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 haven't figured out a way to not load it. Everything we send using restutil
loads the object in-memory. The restriction on the agent side for the uncompressed archive is 150 MB (from my testing on actual log data, this will result in a compressed archive of 13-15 MB). On the host, the restriction is 100 MB.
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.
If we plan on adding resource limiters to this process/thread, can that potentially break/delay uploading the logs to Host?
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.
In theory, it could. However, from the memory point of view, all this is adding is an overhead of ~15 MB (worst case scenario) every hour. Disk I/O could be a bigger problem, but we don't have any plans for limiting that in the near future.
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.
Small comments
raise NotImplementedError("Unimplemented") | ||
""" | ||
Try to upload VM logs, a compressed zip file, via the host plugin /vmAgentLog channel. | ||
:param content: the binary content of the zip file to upload |
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.
If we plan on adding resource limiters to this process/thread, can that potentially break/delay uploading the logs to Host?
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.
LGTM, with a minor comment
Description
Continuation of the work started in #1847. These changes update the wire client, wire protocol and host plugin with an API for uploading logs.
PR information
Quality of Code and Contribution Guidelines