Closed newtonjose closed 6 years ago
Yes. Is good practice. But the master version of this vendor don't have the function I need. Only https://github.com/containernetworking/plugins/tree/v0.7/pkg/ns https://github.com/containernetworking/plugins/tree/master/pkg/ns.
You now how I get this specific branch with go get?
TIA
On Fri, Aug 17, 2018, 3:47 AM Jackson notifications@github.com wrote:
@liucimin commented on this pull request.
In utils/ns/ns_linux.go https://github.com/contiv/netplugin/pull/1150#discussion_r210818207:
- }()
- wg.Wait()
- return innerError +}
+// WithNetNSPath executes the passed closure under the given network +// namespace, restoring the original namespace afterwards. +func WithNetNSPath(nspath string, toRun func(NetNS) error) error {
- ns, err := GetNS(nspath)
- if err != nil {
- return err
- }
- defer ns.Close()
- return ns.Do(toRun) +}
maybe these files can use vendor in the project? https://github.com/containernetworking/plugins/tree/master/pkg/ns
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/contiv/netplugin/pull/1150#pullrequestreview-147113699, or mute the thread https://github.com/notifications/unsubscribe-auth/ARjvR5Q0Xqz1DQZG_o4Lxgo8pIiUH6BAks5uRmcJgaJpZM4V0AUL .
Description of the changes
Type of fix:
Bug fix
Fixes #
1054 Please describe:
/proc/[pid]/ns/net
or abind-mount/link(like /var/run/netns/cni-<something>)
to it. So, when the flagmanage_network_ns_lifecycle=true
on the cri-o runtime, contiv return the bug #1054. I made some logical modifications to contiv run over buth net path. Some problems of permission on container, I can't execute the operation on the mounted path and that force me send part of the code to k8s_cni code. Modifications:TODO