kinvolk/kube-spawn

Use --network-namespace-path= instead of relying on ns.Set()

arianvp opened this issue · 1 comments

I was wondering why we don't set --network-namespace-path=<path-to-ns>

In cnispawn, Would be something like:

path := ns.Path()

nspawnOpts := append(nspawnOpts, fmt.Printf("--network-namespace-path=%s", path))

Instead, we seem to be calling ns.Set(). Which can be a bit unsafe in presence of goroutines (https://github.com/containernetworking/plugins/blob/master/pkg/ns/README.md)

This is more of a question out of interest then a request or a bug report. Feel free to close