The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4296

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
It seems that on single-CPU machines the 'ip link del "${veth1}"' call
fails pretty much always. I assume because one side of the veth pair
is attached to the net namespace of the process being killed and the
kernel wipes it immediately, or something like that.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From 5f5dbb9c73c18280e68ff9232cb6e9b04ddd2cae Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Fri, 2 Mar 2018 13:25:40 +0000
Subject: [PATCH] Delete the namespaced veth before killing the process

It seems that on single-CPU machines the 'ip link del "${veth1}"' call
fails pretty much always. I assume because one side of the veth pair
is attached to the net namespace of the process being killed and the
kernel wipes it immediately, or something like that.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
---
 test/includes/clustering.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/includes/clustering.sh b/test/includes/clustering.sh
index dc57012644..1afeac8b59 100644
--- a/test/includes/clustering.sh
+++ b/test/includes/clustering.sh
@@ -102,12 +102,12 @@ teardown_clustering_netns() {
   for ns in $(ls -1 "${TEST_DIR}/ns/"); do
       echo "==> Teardown clustering netns ${ns}"
 
-      pid="$(cat "${TEST_DIR}/ns/${ns}/PID")"
-      kill -9 "${pid}"
-
       veth1="v${ns}1"
       ip link del "${veth1}"
 
+      pid="$(cat "${TEST_DIR}/ns/${ns}/PID")"
+      kill -9 "${pid}"
+
       umount -l "${TEST_DIR}/ns/${ns}/net" >/dev/null 2>&1 || true
       rm -Rf "${TEST_DIR}/ns/${ns}"
   done
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to