[release-4.20] OCPBUGS-114440: Fix probe termination test to use pod status instead of kubelet event text - #31570
Conversation
…of kubelet event text
The [sig-node] Probe configuration terminationGracePeriodSeconds tests
matched a hardcoded substring ("Container started") against the
kubelet "Started" event message to detect container restarts. That
message text differs across kubelet versions: release-4.20/4.21 emit
"Started container %v" while 4.22/main emit "Container started".
The substring match only succeeds with the newer wording, so the test
timed out deterministically on 4.20/4.21 with "context deadline
exceeded" while appearing to pass most of the time on 4.22/main.
Replace the event-message matching with pod.Status.ContainerStatuses:
the container's RestartCount gates on the first restart cycle, and
Running.StartedAt (paired with the "Killing" event's FirstTimestamp)
gives the restart and kill-decision timestamps directly from the API
instead of parsing free-text event messages. This is stable across
kubelet versions and platforms.
Also removes CalculateEventTimeDiff from node_utils.go, which was
only used by the old event-matching logic and has no other callers.
Verified on a live 4.20 cluster: all three tests now pass with
accurate measurements (11s, 10s, and 60s against expected 10s, 10s,
and 60s grace periods).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-111581 has been cloned as Jira Issue OCPBUGS-114440. Will retitle bug to link to clone. DetailsIn response to this:
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. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-114440, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
/jira refresh |
|
@Chandan9112: This pull request references Jira Issue OCPBUGS-114440, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (cmaurya@redhat.com), skipping review request. DetailsIn response to this:
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. |
|
/jira refresh |
|
@Chandan9112: This pull request references Jira Issue OCPBUGS-114440, which is valid. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (cmaurya@redhat.com), skipping review request. DetailsIn response to this:
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. |
|
/verified by CI |
|
@Chandan9112: This PR has been marked as verified by DetailsIn response to this:
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. |
|
/override ci/prow/e2e-metal-ipi-ovn-ipv6 Automated triage: This failure appears unrelated to the PR changes. Rationale: The job failed in the Evidence:
If you disagree with this assessment, AI-generated. Review for accuracy. |
|
/override ci/prow/e2e-aws-ovn-fips Automated triage: This failure appears unrelated to the PR changes. Rationale: PR #31570 changes only the sig-node probe termination test and node test helpers. The AWS FIPS run completed the e2e suite and reported one blocking failure in the unrelated sig-storage local Evidence:
If you disagree with this assessment, AI-generated. Review for accuracy. |
|
@redhat-chai-bot: Overrode contexts on behalf of redhat-chai-bot: ci/prow/e2e-aws-ovn-fips DetailsIn response to this:
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. |
|
@redhat-chai-bot: Overrode contexts on behalf of redhat-chai-bot: ci/prow/e2e-metal-ipi-ovn-ipv6 DetailsIn response to this:
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. |
|
@openshift-cherrypick-robot: The following tests 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-sigs/prow repository. I understand the commands that are listed here. |
This is an automated cherry-pick of #31528
/assign Chandan9112