Bug 2050707 - up test for prometheus pod look to far in the past
Summary: up test for prometheus pod look to far in the past
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.11.0
Assignee: Jan Fajerski
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-04 13:50 UTC by Jan Fajerski
Modified: 2022-08-10 10:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:47:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1553 0 None open Bug 2050707: test: account for pdb and Prometheus' staleness period 2022-02-04 13:52:07 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:47:40 UTC

Description Jan Fajerski 2022-02-04 13:50:25 UTC
Description of problem:
The up test for the prometheus pod (https://github.com/openshift/cluster-monitoring-operator/blob/650c320463c15b3f5a64abcd02a066c7a9c15b4a/test/e2e/main_test.go#L87) counts the number of series returned. Due to prometheus staleness notion this will return samples for all series that have received samples in the last 5 minutes.
Due to improved availability during 4.10 development a 5 minute interval can yield 4 results instead of the expected two. Since the test only polls this condition for one minute it can time out waiting to see 2 pods.


How reproducible:
Run the test linked above.

Actual results:
Test fails with message "wait for prometheus-k8s: expected 2 Prometheus instances but got: 4: timed out waiting for the condition"

Expected results:
Test passes

Additional info:
To fix this, use last_over_time aggregation to reduce the lookback period.

Comment 3 Junqi Zhao 2022-02-15 04:30:12 UTC
LGTM, Test passes

Comment 8 errata-xmlrpc 2022-08-10 10:47:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069


Note You need to log in before you can comment on or make changes to this bug.