From dc3bb7e721aeb6133f1ab0cb8712191b1e37df5d Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Tue, 27 Sep 2016 12:37:02 -0700 Subject: [PATCH] try to use ifdown/ifup if available --- test/e2e/reboot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/reboot.go b/test/e2e/reboot.go index 729a4502152..26b5bbdefd4 100644 --- a/test/e2e/reboot.go +++ b/test/e2e/reboot.go @@ -106,7 +106,7 @@ var _ = framework.KubeDescribe("Reboot [Disruptive] [Feature:Reboot]", func() { It("each node by switching off the network interface and ensure they function upon switch on", func() { // switch the network interface off for a while to simulate a network outage // We sleep 10 seconds to give some time for ssh command to cleanly finish before network is down. - testReboot(f.Client, "nohup sh -c 'sleep 10 && sudo ip link set eth0 down && sleep 120 && sudo ip link set eth0 up' >/dev/null 2>&1 &") + testReboot(f.Client, "nohup sh -c 'sleep 10 && (sudo ifdown eth0 || sudo ip link set eth0 down) && sleep 120 && (sudo ifup eth0 || sudo ip link set eth0 up)' >/dev/null 2>&1 &") }) It("each node by dropping all inbound packets for a while and ensure they function afterwards", func() {