Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshTimeout defaults in Kuma 2.9.x #12667

Closed
lobkovilya opened this issue Jan 27, 2025 · 0 comments · Fixed by #12692
Closed

MeshTimeout defaults in Kuma 2.9.x #12667

lobkovilya opened this issue Jan 27, 2025 · 0 comments · Fixed by #12692
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@lobkovilya
Copy link
Contributor

lobkovilya commented Jan 27, 2025

Root cause in 2.9.0

The initial bug was introduced in 2.9.0 with #11060 by creating an incorrect DefaultTimeoutConf structure:

var DefaultTimeoutConf = api.Conf{
	ConnectionTimeout: &kube_meta.Duration{Duration: policies_defaults.DefaultConnectTimeout},
	IdleTimeout:       &kube_meta.Duration{Duration: policies_defaults.DefaultIdleTimeout},
	Http: &api.Http{
		RequestTimeout:        &kube_meta.Duration{Duration: policies_defaults.DefaultRequestTimeout},
		// Incorrect value
		StreamIdleTimeout:     &kube_meta.Duration{Duration: policies_defaults.DefaultGatewayStreamIdleTimeout},
		MaxStreamDuration:     &kube_meta.Duration{Duration: policies_defaults.DefaultMaxStreamDuration},
		// Incorrect value
		MaxConnectionDuration: &kube_meta.Duration{Duration: policies_defaults.DefaultConnectTimeout},
		RequestHeadersTimeout: &kube_meta.Duration{Duration: policies_defaults.DefaultRequestHeadersTimeout},
	},
}

As a result of the initial bug in Kuma 2.9.0 we have:

  • StreamIdleTimeout is 5 sec instead of 30 min
  • MaxConnectionDuration is 5 sec instead of 0 (disabled)

Incorrect fix in 2.9.1

Users noticed that bug during the upgrade to Kuma 2.9.0 and we got the issue #12033.

The issue was fixed incorrectly #12043, instead of fixing the broken DefaultTimeoutConf structure we added continue:

if conf == nil {
-   conf = &plugin_xds.DefaultTimeoutConf
+   continue
}

As a result of the incorrect fix in Kuma 2.9.1 we have:

  • connectTimeout is 10 sec instead of 5 sec
  • idleTimeout is 2h instead of 1h
  • requestTimeout is 0 (disabled) instead of 15 sec
@lobkovilya lobkovilya added kind/bug A bug triage/pending This issue will be looked at on the next triage meeting labels Jan 27, 2025
@lukidzi lukidzi added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Jan 27, 2025
lobkovilya added a commit that referenced this issue Jan 29, 2025
## Motivation

Explained in #12667

## Supporting documentation

Fix #12667

---------

Signed-off-by: Ilya Lobkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants