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

OCPBUGS-4703: Replace liveness-grace-period-seconds annotation #863

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Dec 9, 2022

Remove the "unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds" annotation from router pods, and instead set terminationGracePeriodSeconds on the pods' liveness probes.

Previously, cluster-ingress-operator started setting this OpenShift-specific annotation on router pods as a short-term measure to configure the liveness probe's grace period in order to fix BZ#1899941. This annotation was implemented by a carry patch in openshift/kubernetes. Since then, upstream Kubernetes has added the terminationGracePeriodSeconds field for configuring probes. Using the new API field enables us to remove the carry patch.

Follow-up to #534.

  • assets/router/deployment.yaml: Remove the unsupported annotation, and specify terminationGracePeriodSeconds on the liveness probe.
  • pkg/manifests/bindata.go: Regenerate.
  • pkg/operator/controller/ingress/deployment.go (deploymentConfigChanged): Remove annotations that the operator owns when those annotations are not expected to be set.
    (copyProbe): Copy the terminationGracePeriodSeconds field.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeploymentSpecTemplate): Expect the unsupported annotation not to be set. Expect terminationGracePeriodSeconds to be set on the liveness probe.
    (TestDeploymentConfigChanged): Verify that deploymentConfigChanged correctly sets the liveness probe's termination grace period seconds and removes the unsupported annotation.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Dec 9, 2022
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-4703, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

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

In response to this:

Remove the "unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds" annotation from router pods, and instead set terminationGracePeriodSeconds on the pods' liveness probes.

Previously, cluster-ingress-operator started setting this OpenShift-specific annotation on router pods as a short-term measure to configure the liveness probe's grace period in order to fix BZ#1899941. This annotation was implemented by a carry patch in openshift/kubernetes. Since then, upstream Kubernetes has added the terminationGracePeriodSeconds field for configuring probes. Using the new API field enables us to remove the carry patch.

Follow-up to #534.

  • assets/router/deployment.yaml: Remove the unsupported annotation, and specify terminationGracePeriodSeconds on the liveness probe.
  • pkg/manifests/bindata.go: Regenerate.
  • pkg/operator/controller/ingress/deployment.go (deploymentConfigChanged): Remove annotations that the operator owns when those annotations are not expected to be set.
    (copyProbe): Copy the terminationGracePeriodSeconds field.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeploymentSpecTemplate): Expect the unsupported annotation not to be set. Expect terminationGracePeriodSeconds to be set on the liveness probe.
    (TestDeploymentConfigChanged): Verify that deploymentConfigChanged correctly removes the unsupported annotation.

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 9, 2022
@Miciah
Copy link
Contributor Author

Miciah commented Dec 11, 2022

/retest-required

@candita
Copy link
Contributor

candita commented Dec 14, 2022

/assign @gcs278

@@ -1438,6 +1439,15 @@ func TestDeploymentConfigChanged(t *testing.T) {
},
expect: true,
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a test case for detecting the changing of deployment.Spec.Template.Spec.Containers[0].LivenessProbe.terminationGracePeriodSeconds? Or maybe it could be added to one of the test cases above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test case for it.

Remove the
"unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds"
annotation from router pods, and instead set terminationGracePeriodSeconds
on the pods' liveness probes.

Previously, cluster-ingress-operator started setting this
OpenShift-specific annotation on router pods as a short-term measure to
configure the liveness probe's grace period in order to fix
BZ#1899941. This annotation was implemented by a carry patch in
openshift/kubernetes.  Since then, upstream Kubernetes has added the
terminationGracePeriodSeconds field for configuring probes.  Using the new
API field enables us to remove the carry patch.

This commit is related to bug 1899941.

https://bugzilla.redhat.com/show_bug.cgi?id=1899941

Follow-up to commit 4017234.

This commit fixes OCPBUGS-4703.

https://issues.redhat.com/browse/OCPBUGS-4703

* assets/router/deployment.yaml: Remove the unsupported annotation, and
specify terminationGracePeriodSeconds on the liveness probe.
* pkg/manifests/bindata.go: Regenerate.
* pkg/operator/controller/ingress/deployment.go (deploymentConfigChanged):
Remove annotations that the operator owns when those annotations are not
expected to be set.
(copyProbe): Copy the terminationGracePeriodSeconds field.
* pkg/operator/controller/ingress/deployment_test.go
(TestDesiredRouterDeploymentSpecTemplate): Expect the unsupported
annotation not to be set.  Expect terminationGracePeriodSeconds to be set
on the liveness probe.
(TestDeploymentConfigChanged): Verify that deploymentConfigChanged
correctly sets the liveness probe's termination grace period seconds and
removes the unsupported annotation.
@Miciah Miciah force-pushed the OCPBUGS-4703-replace-liveness-grace-period-seconds-annotation branch from c0652c9 to cacbafd Compare December 15, 2022 21:53
@openshift-ci-robot openshift-ci-robot added the jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. label Dec 15, 2022
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-4703, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

Remove the "unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds" annotation from router pods, and instead set terminationGracePeriodSeconds on the pods' liveness probes.

Previously, cluster-ingress-operator started setting this OpenShift-specific annotation on router pods as a short-term measure to configure the liveness probe's grace period in order to fix BZ#1899941. This annotation was implemented by a carry patch in openshift/kubernetes. Since then, upstream Kubernetes has added the terminationGracePeriodSeconds field for configuring probes. Using the new API field enables us to remove the carry patch.

Follow-up to #534.

  • assets/router/deployment.yaml: Remove the unsupported annotation, and specify terminationGracePeriodSeconds on the liveness probe.
  • pkg/manifests/bindata.go: Regenerate.
  • pkg/operator/controller/ingress/deployment.go (deploymentConfigChanged): Remove annotations that the operator owns when those annotations are not expected to be set.
    (copyProbe): Copy the terminationGracePeriodSeconds field.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeploymentSpecTemplate): Expect the unsupported annotation not to be set. Expect terminationGracePeriodSeconds to be set on the liveness probe.
    (TestDeploymentConfigChanged): Verify that deploymentConfigChanged correctly sets the liveness probe's termination grace period seconds and removes the unsupported annotation.

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/test-infra repository.

@gcs278
Copy link
Contributor

gcs278 commented Dec 15, 2022

Seems like a straightforward change. Should I also do an approve on this?
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 15, 2022
@Miciah
Copy link
Contributor Author

Miciah commented Dec 15, 2022

I'm fine if you want to approve this since we didn't assign a second reviewer. * grin * .

@gcs278
Copy link
Contributor

gcs278 commented Dec 15, 2022

🚢
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD d9d1a2b and 2 for PR HEAD cacbafd in total

@Miciah
Copy link
Contributor Author

Miciah commented Dec 18, 2022

/retest-required

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 560b2d3 and 1 for PR HEAD cacbafd in total

@melvinjoseph86
Copy link

Using the pre merge verification the bug is verified and steps are attached in the comments of https://issues.redhat.com/browse/OCPBUGS-4703
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Dec 22, 2022
@melvinjoseph86
Copy link

/test e2e-gcp-ovn-serial

@melvinjoseph86
Copy link

/retest-required

@melvinjoseph86
Copy link

/retest

@melvinjoseph86
Copy link

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 26, 2022

@Miciah: The following test 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-gcp-ovn-serial cacbafd link true /test e2e-gcp-ovn-serial

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/test-infra repository. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target OCP 4.12), recalculating validity.

@openshift-bot
Copy link
Contributor

/bugzilla refresh

The requirements for Bugzilla bugs have changed (BZs linked to PRs on main branch need to target OCP 4.12), recalculating validity.

@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-4703, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @melvinjoseph86

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target OCP 4.12), recalculating validity.

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/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 1, 2023

@openshift-bot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Retaining the bugzilla/valid-bug label as it was manually added.

In response to this:

/bugzilla refresh

The requirements for Bugzilla bugs have changed (BZs linked to PRs on main branch need to target OCP 4.12), recalculating validity.

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/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit dc49def into openshift:master Jan 13, 2023
@openshift-ci-robot
Copy link
Contributor

@Miciah: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-4703 has been moved to the MODIFIED state.

In response to this:

Remove the "unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds" annotation from router pods, and instead set terminationGracePeriodSeconds on the pods' liveness probes.

Previously, cluster-ingress-operator started setting this OpenShift-specific annotation on router pods as a short-term measure to configure the liveness probe's grace period in order to fix BZ#1899941. This annotation was implemented by a carry patch in openshift/kubernetes. Since then, upstream Kubernetes has added the terminationGracePeriodSeconds field for configuring probes. Using the new API field enables us to remove the carry patch.

Follow-up to #534.

  • assets/router/deployment.yaml: Remove the unsupported annotation, and specify terminationGracePeriodSeconds on the liveness probe.
  • pkg/manifests/bindata.go: Regenerate.
  • pkg/operator/controller/ingress/deployment.go (deploymentConfigChanged): Remove annotations that the operator owns when those annotations are not expected to be set.
    (copyProbe): Copy the terminationGracePeriodSeconds field.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeploymentSpecTemplate): Expect the unsupported annotation not to be set. Expect terminationGracePeriodSeconds to be set on the liveness probe.
    (TestDeploymentConfigChanged): Verify that deploymentConfigChanged correctly sets the liveness probe's termination grace period seconds and removes the unsupported annotation.

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-moderate Referenced Jira bug's severity is moderate 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. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants