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

Kruize local monitoring test failures due to datasource connection refused error #1395

Open
shreyabiradar07 opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@shreyabiradar07
Copy link
Contributor

Describe the bug
Kruize local monitoring functional tests are failing due to datasource connection refused error with the latest build of Kruize 0.2

Local monitoring functional tests on Kruize Scalelab - https://ci.app-svc-perf.corp.redhat.com/job/ExternalTeams/job/Autotune/job/kruize_local_release_tests/10/#showFailuresLink

In one of the test cases - rest_apis/test_import_metadata.py::test_repeated_metadata_import_without_datasource_connection
we scale down prometheus deployment and replicaset to bring down datasource connection, but due to mismatch in status code and response message for POST /dsmetadata API, assertion error is thrown and prometheus connection is not restored leading to failures in subsequent tests.

Excepted response:

{
    "message": "Metadata cannot be imported, datasource connection refused or timed out",
    "httpcode": 400,
    "documentationLink": "",
    "status": "ERROR"
}

Current response:

Importing the metadata...
URL =  http://kruize-openshift-tuning.apps.bm.example.com/dsmetadata
Response status code =  500
{
    "message": "Internal Server Error: Connect to prometheus-k8s.openshift-monitoring.svc.cluster.local:9091 [prometheus-k8s.openshift-monitoring.svc.cluster.local/172.30.30.25] failed: Connection refused",
    "httpcode": 500,
    "documentationLink": "",
    "status": "ERROR"
}

How to reproduce it
Run the functional tests from local monitoring test suite

Expected behavior
Validation of the expected error message and scaling back the prometheus deployment and statefulset to restore the datasource connection

Relevant logs

************************************************************
Deployment prometheus-operator scaled to 0 replicas successfully.
Deployment prometheus-adapter scaled to 0 replicas successfully.
StatefulSet prometheus-k8s scaled to 0 replicas successfully.

************************************************************
{
    "version": "v1.0",
    "datasource_name": "prometheus-1"
}

************************************************************

Importing the metadata...
URL =  http://kruize-openshift-tuning.apps.bm.example.com/dsmetadata
Response status code =  500
{
    "message": "Internal Server Error: Connect to prometheus-k8s.openshift-monitoring.svc.cluster.local:9091 [prometheus-k8s.openshift-monitoring.svc.cluster.local/172.30.30.25] failed: Connection refused",
    "httpcode": 500,
    "documentationLink": "",
    "status": "ERROR"
}

Environment:

  • Kubernetes Cluster - Openshift
  • Version
  • OS

Additional context
.

@shreyabiradar07 shreyabiradar07 added the bug Something isn't working label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant