kruize / autotune

Autonomous Performance Tuning for Kubernetes!
Apache License 2.0
165 stars 54 forks source link

Fix missing datasource issue on pod restart #1358

Closed khansaad closed 1 week ago

khansaad commented 3 weeks ago

Description

This PR fixes the issue with datasource which is causing a missing or invalid datasource exception. Details for the same are mentioned in Issue 1356

Fixes 1356

Type of change

How has this been tested?

Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

Test Configuration

Checklist :dart:

Additional information

Include any additional information such as links, test results, screenshots here

chandrams commented 2 weeks ago

@khansaad - I still see the issue, Is this working for you?

khansaad commented 2 weeks ago

@khansaad - I still see the issue, Is this working for you?

@chandrams Looks like you're not passing the datasource name in the bulk API demo. In that case, the code takes the default datasource name as prometheus-1 . So, when you're running it with thanos , it's giving you the invalid datasource error which is expected.

I have updated the error message now to indicate the datasource name passed.

chandrams commented 2 weeks ago

@khansaad - I still see the issue, Is this working for you?

@chandrams Looks like you're not passing the datasource name in the bulk API demo. In that case, the code takes the default datasource name as prometheus-1 . So, when you're running it with thanos , it's giving you the invalid datasource error which is expected.

I have updated the error message now to indicate the datasource name passed.

I have tested with the below in the manifest file:

 "datasource": [
        {
          "name": "thanos",
          "provider": "prometheus",
          "serviceName": "",
          "namespace": "",
          "url": "http://thanos-query-frontend.thanos-bench.svc.cluster.local:9090/",
          "authentication": {
            "type": "bearer",
            "credentials": {
              "tokenFilePath": "/var/run/secrets/kubernetes.io/serviceaccount/token"
            }
          }
        }
      ]
chandrams commented 2 weeks ago

I have included datasource in the bulk config, with this I don't see the invalid datasource issue.

msvinaykumar commented 2 weeks ago

@khansaad if required please feel free add negative testcases