Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2f65865

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#35537 from bowei/issue-33302
Automatic merge from submit-queue Use ip link or if{up,down} depending on command availability
2 parents 759dd0d + aad550e commit 2f65865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/reboot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ var _ = framework.KubeDescribe("Reboot [Disruptive] [Feature:Reboot]", func() {
106106
It("each node by switching off the network interface and ensure they function upon switch on", func() {
107107
// switch the network interface off for a while to simulate a network outage
108108
// We sleep 10 seconds to give some time for ssh command to cleanly finish before network is down.
109-
testReboot(f.Client, "nohup sh -c 'sleep 10 && sudo ifdown eth0 && sleep 120 && sudo ifup eth0' >/dev/null 2>&1 &")
109+
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 &")
110110
})
111111

112112
It("each node by dropping all inbound packets for a while and ensure they function afterwards", func() {

0 commit comments

Comments
 (0)