red-hat-storage / ocs-ci

https://ocs-ci.readthedocs.io/en/latest/
MIT License
108 stars 168 forks source link

test_rgw_unavailable is falling on IBM Z #7816

Closed sujoykr1 closed 1 year ago

sujoykr1 commented 1 year ago

tests/manage/monitoring/prometheus/test_rgw.py::test_rgw_unavailable

_ test_rgwunavailable

measure_stop_rgw = {'first_run': True, 'metadata': None, 'prometheus_alerts': [{'activeAt': '2023-06-09T12:16:39.150617301Z', 'annotation...bjectstore', 'rgw': 'ocs-storagecluster-cephobjectstore', 'rook_cluster': 'openshift-storage', ...}}, ...}, ...}], ...}

@tier4c
@pytest.mark.polarion_id("OCS-2323")
@pytest.mark.bugzilla("1953615")
@skipif_managed_service
def test_rgw_unavailable(measure_stop_rgw):
    """
    Test that there is appropriate alert when RGW is unavailable and that
    this alert is cleared when the RGW interface is back online.

    """
    api = prometheus.PrometheusAPI()

    # get alerts from time when manager deployment was scaled down
    alerts = measure_stop_rgw.get("prometheus_alerts")
    target_label = constants.ALERT_CLUSTEROBJECTSTORESTATE
    # The alert message is changed since OCS 4.7
    ocs_version = config.ENV_DATA["ocs_version"]
    if Version.coerce(ocs_version) < Version.coerce("4.7"):
        target_msg = (
            "Cluster Object Store is in unhealthy state for more than 15s. "
            "Please check Ceph cluster health or RGW connection."
        )
    else:
        target_msg = "Cluster Object Store is in unhealthy state. Please check Ceph cluster health."
    states = ["pending", "firing"]
  prometheus.check_alert_list(

label=target_label, msg=target_msg, alerts=alerts, states=states, severity="error", )

tests/manage/monitoring/prometheus/test_rgw.py:42:

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs.

github-actions[bot] commented 1 year ago

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.