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

libpod: report slirp4netns network stats #13101

Merged

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Feb 1, 2022

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]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 1, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2022
@rhatdan
Copy link
Member

rhatdan commented Feb 1, 2022

LGTM
@mheon @Luap99 PTAL

@giuseppe giuseppe force-pushed the report-slirp4netns-stats branch from 864dae4 to 66add34 Compare February 1, 2022 13:47
Copy link
Member

@Luap99 Luap99 left a 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.

  1. We should not hardcode eth0 and instead read the interface name from the network status
  2. How do we handle multiple interfaces? Should we add stats together?
  3. 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]>
@giuseppe giuseppe force-pushed the report-slirp4netns-stats branch from 66add34 to 865f0a1 Compare February 1, 2022 15:24
@giuseppe
Copy link
Member Author

giuseppe commented Feb 1, 2022

  1. We should not hardcode eth0 and instead read the interface name from the network status
  2. How do we handle multiple interfaces? Should we add stats together?

Yes, I think we need to read all the devices available and add stats together.

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

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
Copy link
Member

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

@rhatdan
Copy link
Member

rhatdan commented Feb 1, 2022

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.
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2022
@openshift-merge-robot openshift-merge-robot merged commit dad946b into containers:main Feb 1, 2022
giuseppe added a commit to giuseppe/libpod that referenced this pull request Feb 1, 2022
follow-up for containers#13101

[CI:DOCS]

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member Author

giuseppe commented Feb 1, 2022

and @giuseppe can address the other requests in a separate PR

follow-up PR: #13104

mheon pushed a commit to mheon/libpod that referenced this pull request Feb 3, 2022
follow-up for containers#13101

[CI:DOCS]

Signed-off-by: Giuseppe Scrivano <[email protected]>
patrycja-guzik pushed a commit to patrycja-guzik/podman that referenced this pull request Feb 15, 2022
follow-up for containers#13101

[CI:DOCS]

Signed-off-by: Giuseppe Scrivano <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NET IO BLOCK IO is Not Present via Running podman stats
4 participants