-
Notifications
You must be signed in to change notification settings - Fork 220
NE-577: Support a Configurable ROUTER_MAX_CONNECTIONS in HAproxy #735
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
NE-577: Support a Configurable ROUTER_MAX_CONNECTIONS in HAproxy #735
Conversation
|
/hold Needs the EP to be approved. |
9ce070e to
0471f55
Compare
|
Errors:
/retest |
0471f55 to
97411cd
Compare
/test e2e-aws-operator |
0ec78a9 to
ebcbaee
Compare
gcs278
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
124d543 to
9932463
Compare
|
/retest |
9932463 to
e50a904
Compare
04289c0 to
f3c8b33
Compare
a7ba4cd to
c086bda
Compare
523c0c0 to
586775e
Compare
Switch from the unsupported config override to the tuning option introduced in openshift/api#1161.
586775e to
6620e18
Compare
|
/retest |
|
/label docs-approved |
|
/label px-approved |
Miciah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few suggestions to simplify the code, but overall I would be fine with merging this as-is.
| Raw: []byte(`{"loadBalancingAlgorithm":"random","dynamicConfigManager":"false","maxConnections":-1,"reloadInterval":15}`), | ||
| Raw: []byte(`{"loadBalancingAlgorithm":"random","dynamicConfigManager":"false","reloadInterval":15}`), | ||
| } | ||
| ic.Spec.TuningOptions.MaxConnections = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be moved above, here:
cluster-ingress-operator/pkg/operator/controller/ingress/deployment_test.go
Lines 430 to 434 in 6620e18
| ic.Spec.TuningOptions = operatorv1.IngressControllerTuningOptions{ | |
| HeaderBufferBytes: 16384, | |
| HeaderBufferMaxRewriteBytes: 4096, | |
| ThreadCount: RouterHAProxyThreadsDefaultValue * 2, | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean above? I added MaxConnections as an addition after ThreadCount.
test/e2e/maxconn_test.go
Outdated
| ) | ||
|
|
||
| func TestTunableMaxConnectionsValidValues(t *testing.T) { | ||
| updateMaxConnections := func(t *testing.T, client client.Client, timeout time.Duration, maxConnections int32, c *operatorv1.IngressController) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you only use c as a way to get the name of the object and then as a place to store the object that you get from the API, which is subtle. What do you think about replacing the *operatorv1.IngressController parameter with a types.NamespacedName parameter and using a local variable to store the object from the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense just to use kclient and time.Minute instead of parameterizing the client and timeout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want the caller to specify how long to wait for. And I'd rather not have a mismatch of globals and discrete parameter values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you only use c as a way to get the name of the object and then as a place to store > the object that you get from the API, which is subtle. What do you think about replacing the > *operatorv1.IngressController parameter with a types.NamespacedName parameter and using a >local variable to store the object from the API?
Done.
test/e2e/maxconn_test.go
Outdated
| conditions := []operatorv1.OperatorCondition{ | ||
| {Type: operatorv1.IngressControllerAvailableConditionType, Status: operatorv1.ConditionTrue}, | ||
| {Type: operatorv1.LoadBalancerManagedIngressConditionType, Status: operatorv1.ConditionFalse}, | ||
| {Type: operatorv1.DNSManagedIngressConditionType, Status: operatorv1.ConditionFalse}, | ||
| } | ||
| t.Logf("waiting for ingresscontroller %v", icName) | ||
| if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, conditions...); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| conditions := []operatorv1.OperatorCondition{ | |
| {Type: operatorv1.IngressControllerAvailableConditionType, Status: operatorv1.ConditionTrue}, | |
| {Type: operatorv1.LoadBalancerManagedIngressConditionType, Status: operatorv1.ConditionFalse}, | |
| {Type: operatorv1.DNSManagedIngressConditionType, Status: operatorv1.ConditionFalse}, | |
| } | |
| t.Logf("waiting for ingresscontroller %v", icName) | |
| if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, conditions...); err != nil { | |
| t.Logf("waiting for ingresscontroller %v", icName) | |
| if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, availableConditionsForPrivateIngressController...); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| Raw: []byte(`{"loadBalancingAlgorithm":"source","dynamicConfigManager":"true","maxConnections":40000}`), | ||
| Raw: []byte(`{"loadBalancingAlgorithm":"source","dynamicConfigManager":"true"}`), | ||
| } | ||
| ic.Spec.TuningOptions.MaxConnections = 40000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestDesiredRouterDeploymentSpecAndNetwork feels like it should be at least two separate tests, but that can be a further cleanup for another day.
$ go get github.com/openshift/api@1469fac35c7515f007526e51f519eef7339a1bbb $ go mod vendor $ go mod tidy
|
@Miciah I addressed your feedback with my latest push. /hold cancel |
|
FAIL: TestHTTPCookieCapture /test e2e-aws-operator |
|
/test e2e-upgrade |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frobware, Miciah The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/skip |
|
@frobware: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This implements openshift/enhancements#1084.
Requires openshift/api#1161 [MERGED]