mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #28572 from atombender/master
Automatic merge from submit-queue Fixes bad heuristic when calling "tc show" to check interface `tc` sometimes returns stuff that has more than 12 words in its response. The heuristic is bad, but this at least fixes the case when `tc` is returning too much. Fixes #28571.
This commit is contained in:
commit
66522389b7
@ -255,7 +255,7 @@ func (t *tcShaper) ReconcileInterface() error {
|
|||||||
return t.initializeInterface()
|
return t.initializeInterface()
|
||||||
}
|
}
|
||||||
fields := strings.Split(output, " ")
|
fields := strings.Split(output, " ")
|
||||||
if len(fields) != 12 || fields[1] != "htb" || fields[2] != "1:" {
|
if len(fields) < 12 || fields[1] != "htb" || fields[2] != "1:" {
|
||||||
if err := t.deleteInterface(fields[2]); err != nil {
|
if err := t.deleteInterface(fields[2]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user