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

4.15 automation [OCS-5576]: Fail prometheus and verify that the alert still exists after recovering it. #10849

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
get_operator_pods,
get_osd_pods,
delete_pods,
get_prometheus_pods,
)
from ocs_ci.utility.utils import ceph_health_check
from ocs_ci.utility import prometheus
Expand Down Expand Up @@ -213,6 +214,21 @@ def test_alert_by_restarting_operator_and_ceph_pods(
log.info("Validating the alert after the OSD pod restart")
assert self.active_mds_alert_values(threading_lock)

@pytest.mark.polarion_id("OCS-5576")
def test_mds_cache_alert_after_recovering_prometheus_from_failures(
self, run_metadata_io_with_cephfs, threading_lock
):
"""
This test function verifies the mds cache alert and fails the prometheus.
It also verifies the alert after recovering prometheus from failures.

"""
assert self.active_mds_alert_values(threading_lock)
log.info("Bring down the prometheus")
list_of_prometheus_pod_obj = get_prometheus_pods()
delete_pods(list_of_prometheus_pod_obj)
assert self.active_mds_alert_values(threading_lock)

@pytest.mark.polarion_id("OCS-5577")
def test_mds_cache_alert_with_active_node_scaledown(
self, run_metadata_io_with_cephfs, threading_lock
Expand Down
Loading