Run of fresh-snapshots for golang-github-vishvananda-netns

Try this locally (using silver-platter):

debian-svp new-upstream --snapshot golang-github-vishvananda-netns 

Merge these changes:

Summary

Merged new upstream version: 0.0~git20190625.0.7109fa8 (was: 0.0~git20170707.0.86bef33).

Diff

diff --git a/README.md b/README.md
index 66a5f72..6b45cfb 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,6 @@ func main() {
 
     // Create a new network namespace
     newns, _ := netns.New()
-    netns.Set(newns)
     defer newns.Close()
 
     // Do something with the network namespace
diff --git a/debian/changelog b/debian/changelog
index 2a35941..aa1255f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-golang-github-vishvananda-netns (0.0~git20170707.0.86bef33-2) UNRELEASED; urgency=medium
+golang-github-vishvananda-netns (0.0~git20190625.0.7109fa8-1) UNRELEASED; urgency=medium
 
+  [ Alexandre Viau ]
   * Point Vcs-* urls to salsa.debian.org.
 
- -- Alexandre Viau <aviau@debian.org>  Mon, 02 Apr 2018 21:11:13 -0400
+  [ Debian Janitor ]
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Mon, 14 Oct 2019 21:13:22 +0000
 
 golang-github-vishvananda-netns (0.0~git20170707.0.86bef33-1) unstable; urgency=medium
 
diff --git a/netns_linux.go b/netns_linux.go
index a267c71..b1e3b07 100644
--- a/netns_linux.go
+++ b/netns_linux.go
@@ -21,8 +21,10 @@ var SYS_SETNS = map[string]uintptr{
 	"arm":     375,
 	"mips":    4344,
 	"mipsle":  4344,
+	"mips64le":  4344,
 	"ppc64":   350,
 	"ppc64le": 350,
+	"riscv64": 268,
 	"s390x":   339,
 }[runtime.GOARCH]
 
@@ -52,7 +54,8 @@ func Set(ns NsHandle) (err error) {
 	return Setns(ns, CLONE_NEWNET)
 }
 
-// New creates a new network namespace and returns a handle to it.
+// New creates a new network namespace, sets it as current and returns
+// a handle to it.
 func New() (ns NsHandle, err error) {
 	if err := syscall.Unshare(CLONE_NEWNET); err != nil {
 		return -1, err
@@ -188,6 +191,12 @@ func getPidForContainer(id string) (int, error) {
 		filepath.Join(cgroupRoot, "system.slice", "docker-"+id+".scope", "tasks"),
 		// Even more recent docker versions under cgroup/systemd/docker/<id>/
 		filepath.Join(cgroupRoot, "..", "systemd", "docker", id, "tasks"),
+		// Kubernetes with docker and CNI is even more different
+		filepath.Join(cgroupRoot, "..", "systemd", "kubepods", "*", "pod*", id, "tasks"),
+		// Another flavor of containers location in recent kubernetes 1.11+
+		filepath.Join(cgroupRoot, cgroupThis, "kubepods.slice", "kubepods-besteffort.slice", "*", "docker-"+id+".scope", "tasks"),
+		// When runs inside of a container with recent kubernetes 1.11+
+		filepath.Join(cgroupRoot, "kubepods.slice", "kubepods-besteffort.slice", "*", "docker-"+id+".scope", "tasks"),
 	}
 
 	var filename string

Full worker log Full build log