-
Notifications
You must be signed in to change notification settings - Fork 2.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
libpod: report slirp4netns network stats #13101
libpod: report slirp4netns network stats #13101
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
864dae4
to
66add34
Compare
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 but we still have to fix the other cases I mentioned in the issue.
- We should not hardcode eth0 and instead read the interface name from the network status
- How do we handle multiple interfaces? Should we add stats together?
- For slirp4netns with rootlessport forwarder the traffic send via the port forwarding will not be counted on the tap0 interface. You can only see it on the loopback interface. (This should be at least documented.)
by default slirp4netns uses the tap0 device. When slirp4netns is used, use that device by default instead of eth0. Closes: containers#11695 Signed-off-by: Giuseppe Scrivano <[email protected]>
66add34
to
865f0a1
Compare
Yes, I think we need to read all the devices available and add stats together.
Good point. Added a note to the documentation |
@@ -98,6 +98,10 @@ ID NAME MEM USAGE / LIMIT | |||
6eae9e25a564 clever_bassi 3.031MB / 16.7GB | |||
``` | |||
|
|||
Note: When using a slirp4netns network, the traffic send via the port forwarding will be accounted |
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 should mention the rootlesskit port handler, with --network slirp4netns:port_handler=slirp4netns
it should be counted correctly on tap0 AFAIK
I am going to merge, and @giuseppe can address the other requests in a separate PR. Do not want to miss getting this into 4.0. |
follow-up for containers#13101 [CI:DOCS] Signed-off-by: Giuseppe Scrivano <[email protected]>
follow-up for containers#13101 [CI:DOCS] Signed-off-by: Giuseppe Scrivano <[email protected]>
follow-up for containers#13101 [CI:DOCS] Signed-off-by: Giuseppe Scrivano <[email protected]>
by default slirp4netns uses the tap0 device. When slirp4netns is
used, use that device by default instead of eth0.
Closes: #11695
Signed-off-by: Giuseppe Scrivano [email protected]