Skip to content

Commit e5524f5

Browse files
authored
Merge pull request kubernetes#88099 from cheftako/master
Fix gce-cos-master-reboot test
2 parents b2bf4a8 + e8f67d1 commit e5524f5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test/e2e/cloud/gcp/reboot.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,22 @@ var _ = SIGDescribe("Reboot [Disruptive] [Feature:Reboot]", func() {
114114
ginkgo.It("each node by switching off the network interface and ensure they function upon switch on", func() {
115115
// switch the network interface off for a while to simulate a network outage
116116
// We sleep 10 seconds to give some time for ssh command to cleanly finish before network is down.
117-
testReboot(f.ClientSet, "nohup sh -c 'sleep 10 && sudo ip link set eth0 down && sleep 120 && sudo ip link set eth0 up && (sudo dhclient || true)' >/dev/null 2>&1 &", nil)
117+
cmd := "nohup sh -c '" +
118+
"sleep 10; " +
119+
"echo Shutting down eth0 | sudo tee /dev/kmsg; " +
120+
"sudo ip link set eth0 down | sudo tee /dev/kmsg; " +
121+
"sleep 120; " +
122+
"echo Starting up eth0 | sudo tee /dev/kmsg; " +
123+
"sudo ip link set eth0 up | sudo tee /dev/kmsg; " +
124+
"sleep 10; " +
125+
"echo Retrying starting up eth0 | sudo tee /dev/kmsg; " +
126+
"sudo ip link set eth0 up | sudo tee /dev/kmsg; " +
127+
"echo Running dhclient | sudo tee /dev/kmsg; " +
128+
"sudo dhclient | sudo tee /dev/kmsg; " +
129+
"echo Starting systemd-networkd | sudo tee /dev/kmsg; " +
130+
"sudo systemctl restart systemd-networkd | sudo tee /dev/kmsg" +
131+
"' >/dev/null 2>&1 &"
132+
testReboot(f.ClientSet, cmd, nil)
118133
})
119134

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

0 commit comments

Comments
 (0)