Commit 02aefc1
Add a delay between killing teamd processes (sonic-net#3325)
* Add a delay between killing teamd processes
When killing 10 or more teamd processes, add a delay of 0.1 seconds
after every 10 kill signals/proceses. This is because in the LAG scale
tests (in `ecmp/inner_hashing/test_inner_hashing_lag.py` in sonic-mgmt),
it may create 100 LAGs, and when destroying them all, some of those LAGs
may fail to be properly destroyed, leaving some stale port channels
around. This seems to be because the netlink socket buffers on which the
teamd processes get notifications become full with events of the other
port channels/interfaces going down.
As a workaround, add some delays in killing the teamd processes, so that
the netlink buffers don't become full, causing messages to get dropped.
This delay was randomly chosen, and it seems to work well with 100 LAGs
on a KVM. It can probably made to be a bit more aggressive if needed
(i.e. maybe 0.05 seconds every 20 processes).1 parent 6f8ad3d commit 02aefc1
3 files changed
Lines changed: 241 additions & 74 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | | - | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
178 | | - | |
179 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
183 | | - | |
184 | | - | |
185 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
| |||
191 | 204 | | |
192 | 205 | | |
193 | 206 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 207 | + | |
202 | 208 | | |
203 | | - | |
204 | | - | |
| 209 | + | |
| 210 | + | |
205 | 211 | | |
206 | | - | |
207 | | - | |
| 212 | + | |
208 | 213 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 214 | | |
214 | 215 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | 216 | | |
221 | 217 | | |
222 | 218 | | |
223 | 219 | | |
224 | 220 | | |
225 | 221 | | |
226 | 222 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | 223 | | |
231 | 224 | | |
232 | | - | |
233 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
234 | 229 | | |
235 | 230 | | |
236 | 231 | | |
| |||
658 | 653 | | |
659 | 654 | | |
660 | 655 | | |
661 | | - | |
662 | | - | |
663 | 656 | | |
664 | 657 | | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | 658 | | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
686 | 670 | | |
687 | 671 | | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
| 672 | + | |
695 | 673 | | |
696 | | - | |
| 674 | + | |
697 | 675 | | |
698 | 676 | | |
699 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
| 230 | + | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
0 commit comments