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

what about using cni/plugins/ns instead of nsenter? #159

Closed
yeya24 opened this issue Jan 20, 2020 · 4 comments
Closed

what about using cni/plugins/ns instead of nsenter? #159

yeya24 opened this issue Jan 20, 2020 · 4 comments

Comments

@yeya24
Copy link
Contributor

yeya24 commented Jan 20, 2020

Question

https://github.com/containernetworking/plugins/blob/master/pkg/ns/README.md has basic network ns utilities. Is it better to use it instead of using cmd with nsenter?

With that pkg, we can solve #64 as well.

But with that pkg, the code will become more complicated than the current implementation.

@zhouqiang-cl
Copy link
Contributor

@YangKeao @cwen0 PTAL

@zhouqiang-cl zhouqiang-cl added the type/suggestion suggestion label Jan 21, 2020
@YangKeao
Copy link
Member

@yeya24 Thanks for your suggestion 🍻 . In the previous version of chaos-mesh, we setns through github.com/vishvananda/netns pkg. In #31, chaos-mesh turned to use nsenter to enter a network namespace.

According to the document you have shared with us, after go 1.10 we can work with network namespace in go safely.

I will take a look at what changes have been made by go 1.10 and how it solved problems issued by weavenet.

Controling networkspace in a "programmable" way is definitely better than using nsenter and the limitation (require go >= 1.10) is surely acceptable. I will work on this right after Spring Festival (or would you contribute to chaos-mesh 😄 ? )

@yeya24
Copy link
Contributor Author

yeya24 commented Jan 21, 2020

@YangKeao Thanks. To be honest, I haven't noticed that network ns leakage before. I am not sure whether this package is safe enough, though it is used in CNI. I think I can investigate more and test locally first for this plan.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants