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

Test case changes for RHSTOR-5823 #10973

Merged
merged 7 commits into from
Jan 21, 2025
Merged
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 @@ -2,7 +2,7 @@
import pytest

from concurrent.futures import ThreadPoolExecutor
from ocs_ci.framework.pytest_customization.marks import blue_squad
from ocs_ci.framework.pytest_customization.marks import blue_squad, skipif_ocs_version
from ocs_ci.framework.testlib import E2ETest, tier2
from ocs_ci.helpers import helpers
from ocs_ci.ocs import cluster, constants
Expand Down Expand Up @@ -57,12 +57,14 @@ def active_mds_alert_values(threading_lock):
alert_list = api.wait_for_alert(name=cpu_alert, state="pending")
message = f"Ceph metadata server pod ({active_mds_pod}) has high cpu usage"
description = (
f"Ceph metadata server pod ({active_mds_pod}) has high cpu usage."
f"\nPlease consider increasing the CPU request for the {active_mds_pod} pod as described in the runbook."
f"Ceph metadata server pod ({active_mds_pod}) has high cpu usage"
f"\n. Please consider Vertical"
f"\nscaling, by adding more resources to the existing MDS pod."
f"\nPlease see 'runbook_url' for more details."
)
runbook = (
"https://github.com/openshift/runbooks/blob/master/alerts/"
"openshift-container-storage-operator/CephMdsCpuUsageHigh.md"
"openshift-container-storage-operator/CephMdsCPUUsageHighNeedsVerticalScaling.md "
)
severity = "warning"
state = ["pending"]
Expand All @@ -82,6 +84,7 @@ def active_mds_alert_values(threading_lock):

@tier2
@blue_squad
@skipif_ocs_version("<4.18")
class TestMdsCpuAlerts(E2ETest):
@pytest.fixture(scope="function", autouse=True)
def teardown(self, request):
Expand All @@ -97,7 +100,8 @@ def finalizer():
@pytest.mark.polarion_id("OCS-5581")
def test_alert_triggered(self, run_file_creator_io_with_cephfs, threading_lock):
"""
This test case is to verify the alert for MDS cpu high usage
This test case is to verify the alert for MDS cpu high usage for only vertical scaling,
alert for Horizontal scaling is skipped as it is not easy to achieve the rate(ceph_mds_request)>=1000.

Args:
run_file_creator_io_with_cephfs: function to generate load on mds cpu to achieve "cpu utilisation >67%"
Expand Down
Loading