Skip to content

Commit

Permalink
perf: increase ovn-nb timeout
Browse files Browse the repository at this point in the history
For large scale, time to ovn-nb might increase and the 10s timeout might cause flip-flops

(cherry picked from commit 78a77f7)
  • Loading branch information
oilbeater committed Sep 16, 2021
1 parent f844a2b commit 34ba16e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/images/kube-ovn-controller-healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail

OVN_NB_DAEMON=/var/run/ovn/ovn-nbctl.$(cat /var/run/ovn/ovn-nbctl.pid).ctl ovn-nbctl --timeout=15 lr-list > /dev/null
OVN_NB_DAEMON=/var/run/ovn/ovn-nbctl.$(cat /var/run/ovn/ovn-nbctl.pid).ctl ovn-nbctl --timeout=60 lr-list > /dev/null

nc -z -w3 127.0.0.1 10660

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func ParseFlags() (*Configuration, error) {
var (
argOvnNbAddr = pflag.String("ovn-nb-addr", "", "ovn-nb address")
argOvnSbAddr = pflag.String("ovn-sb-addr", "", "ovn-sb address")
argOvnTimeout = pflag.Int("ovn-timeout", 30, "")
argOvnTimeout = pflag.Int("ovn-timeout", 60, "")
argKubeConfigFile = pflag.String("kubeconfig", "", "Path to kubeconfig file with authorization and master location information. If not set use the inCluster token.")

argDefaultLogicalSwitch = pflag.String("default-ls", "ovn-default", "The default logical switch name, default: ovn-default")
Expand Down
2 changes: 1 addition & 1 deletion pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ func StartOvnNbctlDaemon(ovnNbAddr string) error {
func CheckAlive() error {
output, err := exec.Command(
"ovn-nbctl",
"--timeout=10",
"--timeout=60",
"show",
).CombinedOutput()

Expand Down

0 comments on commit 34ba16e

Please sign in to comment.