kubeshop / tracetest

🔭 Tracetest - Build integration and end-to-end tests in minutes, instead of days, using OpenTelemetry and trace-based testing.
https://docs.tracetest.io/
Other
1.02k stars 71 forks source link

datastore not provisioning #2565

Open BartNetJS opened 1 year ago

BartNetJS commented 1 year ago

This is my yaml snipped to provision tracetest:

provisioning.yaml: |-
    |
      ---
      # Datastore is where your application stores its traces. You can define several different datastores with
      # different names, however, only one is used by Tracetest.
      # You can see all available datastore configurations at https://kubeshop.github.io/tracetest/supported-backends/
      type: DataStore
      spec:
        name: Jaeger
        # Indicates that this datastore is a jaeger instance
        type: jaeger
        isdefault: true
        # Configures how tracetest connects to jaeger.
        jaeger:
          endpoint: jaeger-query.jp-integration.svc.cluster.local:16685
          tls:
            insecure: true
      ---
      type: Config
      spec:
        analyticsEnabled: true
      ---
      type: PollingProfile
      spec:
        name: Custom Profile
        strategy: periodic
        default: true
        periodic:
          timeout: 30s
          retryDelay: 500ms

After install the datastore is not provisioned:

image

adnanrahic commented 1 year ago

Hi @BartNetJS !

Thanks for opening this issue. Could you provide a bit more info about your setup?

If you could also provide steps to reproduce, that would be awesome!

BartNetJS commented 1 year ago

Hi @adnanrahic

The version is 0.11.8

The provision.yaml file exist in the config folder: image

I tried a helm install and helm upgrade.

The initial yaml file was created with helm template tracetest kubeshop/tracetest > tracetest-kubernetes-manifests.yaml as mentioned in the documentation.

I've changed the url for the jaeger instance and did an upgrade. I noted this og:

2023/05/23 08:22:26 Config file used:  /app/config/config.yaml
tracetest-server v0.11.8 (main)
Starting
New install? false

And then deleted the release and deployed again. I saw that New install? false was still there. And the datastore was not configured.

BartNetJS commented 1 year ago

I also can't change the datastore in th UI, see gif 2023-05-23_11h48_43 and the log:

sending event "Test Connection" (test)
event sent "Test Connection" (test)
2023/05/23 09:48:33 POST /tracetest/api/config/connection TestConnection 286.065377ms
BartNetJS commented 1 year ago

And an issue with the url if tracetest is configured with the suffix /tracetest image see also my yaml file: tracetest.zip

danielbdias commented 1 year ago

Hi @BartNetJS ! Thanks for your data and your report! I'll use them to simulate this problem and as soon as we have an idea on what I'll return here!

BartNetJS commented 1 year ago

Thanks @danielbdias, in the mean time i'm looking for a work around. But via the tracetest cli I don't see an option to install the tracetest server in another namespace. Did I overlooked that? Or is it not possible via the cli?

BartNetJS commented 1 year ago

Maybe good to know. I can save the jaeger URL if i deploy the tracetest without the suffix /tracetest

image

mathnogueira commented 1 year ago

Hey @BartNetJS I'll investigate these issues you are experiencing.

And then deleted the release and deployed again. I saw that New install? false was still there. And the data store was not configured.

When you deleted the release, was the database also deleted? The provisioning only happens in a clean database. If the database is reused, the server will not create the datastore and other structures for you at startup. If you want to reuse the same database, you only need to delete the row in the server table in your tracetest database. This will trick Tracetest to treat your instance as a new install.

About the prefix, I'll take a look at it.

mathnogueira commented 1 year ago

We released a new version yesterday and the prefix bug was fixed in it.

mathnogueira commented 1 year ago

When you deleted the release, was the database also deleted? The provisioning only happens in a clean database. If the database is reused, the server will not create the datastore and other structures for you at startup. If you want to reuse the same database, you only need to delete the row in the server table in your tracetest database. This will trick Tracetest to treat your instance as a new install.

Are you trying to install Tracetest using a new database or an existing one? Would be nice to know, so we can know if that's a bug or a possible feature request.

BartNetJS commented 1 year ago

@mathnogueira I removed tracetest and the database. Then installed with

helm install jp-tracetest kubeshop/tracetest -n jp-integration-f values.yaml

With values.yaml:

provisioning: |
  ---
  # Datastore is where your application stores its traces. You can define several different datastores with
  # different names, however, only one is used by Tracetest.
  # You can see all available datastore configurations at https://kubeshop.github.io/tracetest/supported-backends/
  type: DataStore
  spec:
    name: Jaeger
    # Indicates that this datastore is a jaeger instance
    type: jaeger
    # Configures how tracetest connects to jaeger.
    jaeger:
      endpoint: jaeger-query.jp-integration.svc.cluster.local:16685
      tls:
        insecure: true

Also the release looks ok:

image

But it is not picked up: image