Skip to content

Commit 2aacef1

Browse files
authored
fix: remove netem distribution normal (#796)
The netem tool creates soft locks that blocks the CPU of the node where the disruption is applied.
1 parent 9fe0805 commit 2aacef1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

network/tc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (t *tc) AddNetem(ifaces []string, parent string, handle string, delay time.
9595
params := ""
9696

9797
if delay.Milliseconds() != 0 {
98-
params = fmt.Sprintf("%s delay %dms %dms distribution normal", params, delay.Milliseconds(), delayJitter.Milliseconds())
98+
params = fmt.Sprintf("%s delay %dms %dms", params, delay.Milliseconds(), delayJitter.Milliseconds())
9999
}
100100

101101
if drop != 0 {

network/tc_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ var _ = Describe("Tc", func() {
8080

8181
Context("add 1s delay and 1s delayJitter to lo interface to the root parent without any handle", func() {
8282
It("should execute", func() {
83-
tcExecuter.AssertCalled(GinkgoT(), "Run", []string{"qdisc", "add", "dev", "lo", "root", "netem", "delay", "1000ms", "1000ms", "distribution", "normal", "loss", "5%", "duplicate", "5%", "corrupt", "1%"})
83+
tcExecuter.AssertCalled(GinkgoT(), "Run", []string{"qdisc", "add", "dev", "lo", "root", "netem", "delay", "1000ms", "1000ms", "loss", "5%", "duplicate", "5%", "corrupt", "1%"})
8484
})
8585
})
8686

@@ -90,7 +90,7 @@ var _ = Describe("Tc", func() {
9090
})
9191

9292
It("should execute", func() {
93-
tcExecuter.AssertCalled(GinkgoT(), "Run", []string{"qdisc", "add", "dev", "lo", "root", "handle", "1:", "netem", "delay", "1000ms", "1000ms", "distribution", "normal", "loss", "5%", "duplicate", "5%", "corrupt", "1%"})
93+
tcExecuter.AssertCalled(GinkgoT(), "Run", []string{"qdisc", "add", "dev", "lo", "root", "handle", "1:", "netem", "delay", "1000ms", "1000ms", "loss", "5%", "duplicate", "5%", "corrupt", "1%"})
9494
})
9595
})
9696

@@ -100,7 +100,7 @@ var _ = Describe("Tc", func() {
100100
})
101101

102102
It("should execute", func() {
103-
tcExecuter.AssertCalled(GinkgoT(), "Run", []string{"qdisc", "add", "dev", "lo", "parent", "1:4", "netem", "delay", "1000ms", "1000ms", "distribution", "normal", "loss", "5%", "duplicate", "5%", "corrupt", "1%"})
103+
tcExecuter.AssertCalled(GinkgoT(), "Run", []string{"qdisc", "add", "dev", "lo", "parent", "1:4", "netem", "delay", "1000ms", "1000ms", "loss", "5%", "duplicate", "5%", "corrupt", "1%"})
104104
})
105105
})
106106
})

0 commit comments

Comments
 (0)