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

[release-4.18] OCPBUGS-48377: Add support for IdleConnectionTerminationPolicy #1188

Open
wants to merge 4 commits into
base: release-4.18
Choose a base branch
from

Conversation

alebedev87
Copy link
Contributor

@alebedev87 alebedev87 commented Jan 29, 2025

Manual cherry pick of #1182 and #1186.

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jan 29, 2025
@openshift-ci-robot
Copy link
Contributor

@alebedev87: This pull request references Jira Issue OCPBUGS-48377, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-43745 is in the state ON_QA, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-43745 targets the "4.19.0" version, which is one of the valid target versions: 4.19.0
  • bug has dependents

Requesting review from QA contact:
/cc @lihongan

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Cherry pick of #1182 and #1186.

Instructions 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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Jan 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from alebedev87. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alebedev87
Copy link
Contributor Author

/hold

Hold until openshift/api#2178 and openshift/router#647 merged.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2025
@alebedev87 alebedev87 force-pushed the 4-18-idle-connection-policy branch 2 times, most recently from 1173bef to d852c08 Compare January 29, 2025 23:09
@alebedev87
Copy link
Contributor Author

/testwith e2e-aws-operator openshift/router#647

Copy link
Contributor

openshift-ci bot commented Jan 29, 2025

@alebedev87, testwith: Error processing request. ERROR:

could not determine job runs: requested job is invalid. needs to be formatted like: <org>/<repo>/<branch>/<variant?>/<job>. instead it was: e2e-aws-operator

@alebedev87
Copy link
Contributor Author

/testwith openshift/cluster-ingress-operator/master/e2e-aws-operator openshift/router#647

Copy link
Contributor

openshift-ci bot commented Jan 29, 2025

@alebedev87, testwith: could not generate prow job. ERROR:

no ref for requested test included in command

@alebedev87
Copy link
Contributor Author

/testwith openshift/cluster-ingress-operator/release-4.18/e2e-aws-operator openshift/router#647

frobware and others added 4 commits January 30, 2025 15:54
Enhanced response handlers (`/` and `/healthz`) to include
pod-specific headers (`x-pod-name` and `x-pod-namespace`).

Introduced new environment variables to control HTTP and HTTPS listeners:
- `HTTP2_TEST_SERVER_ENABLE_HTTP_LISTENER`: Enables/disables the HTTP listener.
- `HTTP2_TEST_SERVER_ENABLE_HTTPS_LISTENER`: Enables/disables the HTTPS listener.

Improved error handling to log and terminate if no listeners are
enabled, providing flexibility in determining which listeners to
activate.
Vendor openshift/api module to get `idleConnectionTerminationPolicy` field of IngressController API.

Vendor steps:

go mod edit -replace github.com/openshift/api=github.com/openshift/[email protected]
go mod tidy
go mod vendor
make update
Introduce logic in desiredRouterDeployment to set the environment
variable `ROUTER_IDLE_CLOSE_ON_RESPONSE` when the
`IdleConnectionTerminationPolicy` field in the IngressController spec is
set to `Deferred`. This change enables configuring HAProxy with the
`idle-close-on-response` option for better control over idle connection
termination behaviour.
… DCM feature gate is enabled

The DCM enabled router returns 503 error after a service change on a
route when idle-close-on-response option is enabled and the client
reuses connections. Ref: https://issues.redhat.com/browse/OCPBUGS-48560.
@alebedev87 alebedev87 force-pushed the 4-18-idle-connection-policy branch from d852c08 to d11f6b6 Compare January 30, 2025 15:39
@alebedev87
Copy link
Contributor Author

/testwith openshift/cluster-ingress-operator/release-4.18/e2e-aws-operator openshift/router#647

@alebedev87
Copy link
Contributor Author

Copy link
Contributor

openshift-ci bot commented Jan 30, 2025

@alebedev87: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn d11f6b6 link true /test e2e-aws-ovn
ci/prow/e2e-aws-ovn-upgrade d11f6b6 link true /test e2e-aws-ovn-upgrade
ci/prow/e2e-azure-ovn d11f6b6 link false /test e2e-azure-ovn
ci/prow/e2e-gcp-operator d11f6b6 link true /test e2e-gcp-operator
ci/prow/e2e-azure-operator d11f6b6 link true /test e2e-azure-operator
ci/prow/e2e-aws-operator-techpreview d11f6b6 link false /test e2e-aws-operator-techpreview
ci/prow/e2e-aws-ovn-techpreview d11f6b6 link false /test e2e-aws-ovn-techpreview
ci/prow/e2e-aws-ovn-single-node d11f6b6 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-aws-ovn-serial d11f6b6 link true /test e2e-aws-ovn-serial
ci/prow/e2e-hypershift d11f6b6 link true /test e2e-hypershift
ci/prow/e2e-aws-operator d11f6b6 link true /test e2e-aws-operator
ci/prow/okd-scos-e2e-aws-ovn d11f6b6 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Instructions 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-sigs/prow repository. I understand the commands that are listed here.

@alebedev87
Copy link
Contributor Author

/testwith openshift/cluster-ingress-operator/release-4.18/e2e-aws-operator openshift/router#647

Deprovisioning failed.

@alebedev87 alebedev87 changed the title [release-4.18] OCPBUGS-48377: Add support for IdleCloseTerminationPolicy [release-4.18] OCPBUGS-48377: Add support for IdleConnectionTerminationPolicy Jan 31, 2025
@lihongan
Copy link
Contributor

lihongan commented Feb 5, 2025

launch openshift/cluster-ingress-operator#1188,openshift/router#647 gcp by cluster-bot and the pre-merge test passed

$ oc get clusterversion
NAME      VERSION                                                   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.18.0-0.ci.test-2025-02-05-091857-ci-ln-b54izc2-latest   True        False         17m     Cluster version is 4.18.0-0.ci.test-2025-02-05-091857-ci-ln-b54izc2-latest

## note the default is Deferred 
$ oc -n openshift-ingress-operator get ingresscontroller/default -oyaml | yq .spec.idleConnectionTerminationPolicy
Deferred

$ oc -n openshift-ingress get deployment router-default -oyaml | grep IDLE -A1
        - name: ROUTER_IDLE_CLOSE_ON_RESPONSE
          value: "true"

sh-5.1$ grep idle haproxy.config -B4
  frontend public
    
  bind :80
  mode http
  option idle-close-on-response
--
frontend fe_sni
  # terminate ssl on edge
  bind unix@/var/lib/haproxy/run/haproxy-sni.sock ssl crt /var/lib/haproxy/router/certs/default.pem crt-list /var/lib/haproxy/conf/cert_config.map accept-proxy no-alpn
  mode http
  option idle-close-on-response
--
frontend fe_no_sni
  # terminate ssl on edge
  bind unix@/var/lib/haproxy/run/haproxy-no-sni.sock ssl crt /var/lib/haproxy/router/certs/default.pem accept-proxy no-alpn
  mode http
  option idle-close-on-response

## update to Immediate
$ oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec":{"idleConnectionTerminationPolicy":"Immediate"}}'
ingresscontroller.operator.openshift.io/default patched

$ oc -n openshift-ingress exec router-default-7f5b848499-sfss9 -- grep idle haproxy.config
command terminated with exit code 1

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Feb 5, 2025
@openshift-ci-robot
Copy link
Contributor

@alebedev87: This pull request references Jira Issue OCPBUGS-48377, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-43745 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-43745 targets the "4.19.0" version, which is one of the valid target versions: 4.19.0
  • bug has dependents

Requesting review from QA contact:
/cc @lihongan

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Manual cherry pick of #1182 and #1186.

Instructions 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 openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants