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

Datasource is either missing or is invalid with Thanos on Kind cluster #1473

Open
chandrams opened this issue Jan 23, 2025 · 1 comment · Fixed by #1479
Open

Datasource is either missing or is invalid with Thanos on Kind cluster #1473

chandrams opened this issue Jan 23, 2025 · 1 comment · Fixed by #1479
Assignees
Labels
bug Something isn't working

Comments

@chandrams
Copy link
Contributor

Describe the bug
Configured kruize with thanos datasource on kind cluster, on invoking Bulk API it failed with

Datasource is either missing or is invalid: thanos
java.lang.Exception: Datasource is either missing or is invalid: thanos

Datasource config used:

 "datasource": [
        {
          "name": "thanos",
          "provider": "prometheus",
          "serviceName": "",
          "namespace": "",
          "url": "http://127.0.0.1:9090"
        }
      ]

How to reproduce it

  • Setup kind & install thanos operator following steps here
  • Port forward the thanos & minio services using kubectl
    kubectl port-forward svc/minio 9000:9000 -n thanos-operator-system
    kubectl port-forward svc/thanos-query-frontend-example-query 9090:9090 -n thanos-operator-system
  • Update the datasource section in manifests & deploy kruize
  • Invoke Bulk API using datasource as thanos

Expected behavior
Thanos datasource should be detected & Bulk API should generate recommendations

Relevant logs

Waiting for experiments ... 
2025-01-2222:09:01.656 ERROR [qtp817686795-75][ListDatasourcesAPIObject.java(41)]-No datasources found
2025-01-2222:09:03.767 ERROR [qtp817686795-76][ListDatasourcesAPIObject.java(41)]-No datasources found
2025-01-2222:23:08.104 ERROR [pool-9-thread-1][BulkJobManager.java(145)]-Datasource is either missing or is invalid: thanos
java.lang.Exception: Datasource is either missing or is invalid: thanos
	at com.autotune.common.utils.CommonUtils.getDataSourceInfo(CommonUtils.java:310)
	at com.autotune.analyzer.workerimpl.BulkJobManager.run(BulkJobManager.java:143)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
2025-01-2222:23:08.105 ERROR [pool-9-thread-1][BulkJobManager.java(292)]-Cannot invoke "com.autotune.common.datasource.DataSourceInfo.getAuthenticationConfig()" because "dataSourceInfo" is null
java.lang.NullPointerException: Cannot invoke "com.autotune.common.datasource.DataSourceInfo.getAuthenticationConfig()" because "dataSourceInfo" is null
	at com.autotune.utils.GenericRestApiClient.<init>(GenericRestApiClient.java:76)
	at com.autotune.analyzer.workerimpl.BulkJobManager.setFinalJobStatus(BulkJobManager.java:309)
	at com.autotune.analyzer.workerimpl.BulkJobManager.run(BulkJobManager.java:149)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
2025-01-2222:23:08.109 INFO [qtp817686795-76][BulkService.java(78)]-Job ID: 82f2c5b7-80e8-49e2-b6f8-e32be2b0823a
2025-01-2222:23:08.109 INFO [qtp817686795-76][BulkService.java(89)]-Job Status: FAILED

Environment:

  • Kubernetes Cluster - Kind
  • Version - 1.24.0
@chandrams chandrams added the bug Something isn't working label Jan 23, 2025
@khansaad khansaad self-assigned this Jan 23, 2025
@khansaad khansaad moved this to Under Review in Monitoring Jan 28, 2025
@khansaad khansaad added this to the Kruize 0.4 Release milestone Jan 28, 2025
@khansaad khansaad linked a pull request Jan 28, 2025 that will close this issue
12 tasks
@dinogun dinogun moved this from Under Review to In Progress in Monitoring Jan 29, 2025
@chandrams
Copy link
Contributor Author

@khansaad I still see this issue, can you please check with kind

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
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants