This message was deleted.
s
This message was deleted.
1
s
Hello, This is probably happening because if the order of the pod spin up. Can you exec into clickhouse and run
DROP TABLE signoz_metrics.schema_migrations
w
Thanks, but that didn't seem to help:
Copy code
chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.signoz.svc.cluster.local :) DROP TABLE signoz_metrics.schema_migrations

DROP TABLE signoz_metrics.schema_migrations

Query id: f76b3940-d558-4ef0-99eb-4286c4f0fc93

Ok.

0 rows in set. Elapsed: 0.002 sec.
Still getting the same issue:
Copy code
helm upgrade signoz signoz/signoz --namespace signoz --values values.yaml
coalesce.go:237: warning: skipped value for zookeeper.initContainers: Not a table.
Error: UPGRADE FAILED: pre-upgrade hooks failed: 1 error occurred:
	* timed out waiting for the condition
And the pod logs:
Copy code
{"level":"info","timestamp":"2024-02-14T16:41:47.585Z","caller":"signozschemamigrator/migrate.go:83","msg":"Setting env var SIGNOZ_CLUSTER","component":"migrate cli","cluster-name":"cluster"}
{"level":"info","timestamp":"2024-02-14T16:41:47.586Z","caller":"signozschemamigrator/migrate.go:100","msg":"Successfully set env var SIGNOZ_CLUSTER ","component":"migrate cli","cluster-name":"cluster"}
{"level":"info","timestamp":"2024-02-14T16:41:47.591Z","caller":"migrationmanager/manager.go:75","msg":"Running migrations for all migrators","component":"migrationmanager"}
{"level":"info","timestamp":"2024-02-14T16:41:47.591Z","caller":"migrationmanager/manager.go:77","msg":"Running migrations for logs","component":"migrationmanager","migrator":"logs"}
{"level":"info","timestamp":"2024-02-14T16:41:47.717Z","caller":"migrationmanager/manager.go:77","msg":"Running migrations for metrics","component":"migrationmanager","migrator":"metrics"}
{"level":"error","timestamp":"2024-02-14T16:41:47.839Z","caller":"migrationmanager/manager.go:80","msg":"Failed to run migrations for migrator","component":"migrationmanager","migrator":"metrics","error":"clickhouse migrate failed to run, error: Dirty database version 7. Fix and force version.","stacktrace":"<http://github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate|github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate>\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/migrationmanager/manager.go:80\nmain.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:108\nruntime.main\n\t/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:250"}
{"level":"fatal","timestamp":"2024-02-14T16:41:47.839Z","caller":"signozschemamigrator/migrate.go:110","msg":"Failed to run migrations","component":"migrate cli","error":"clickhouse migrate failed to run, error: Dirty database version 7. Fix and force version.","stacktrace":"main.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:110\nruntime.main\n\t/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:250"}
s
Can you share the clickhouse server version?
Do you have more than one clickhouse shard?
w
I installed yesterday from the helm chart with no major customizations.
Clickhouse image is
<http://docker.io/clickhouse/clickhouse-server:23.11.1-alpine|docker.io/clickhouse/clickhouse-server:23.11.1-alpine>
s
The clickhouse version should be updated to
24.1.2-alpine
How did you upgrade from v0.38.2 to v0.39.0
w
helm
s
Charts version?
w
Copy code
helm list
NAME  	NAMESPACE	REVISION	UPDATED                               	STATUS	CHART        	APP VERSION
signoz	signoz   	5       	2024-02-14 16:38:45.88264205 +0000 UTC	failed	signoz-0.35.0	0.39.0
Helm is saying app version 0.39.0, but the signoz UI says the current version is 0.38.2
s
The upgrade must have failed.
p
I had the same issue right now, trying to upgrade up from 0.36.2. Luckily, it was the test database. I can install chart version 0.39.0 if I do it from scratch, but I'm afraid the upgrade was not a happy path.
p
Thanks for reporting! yes, there seems to be issue with our schema migrator for the upgrade flow. schema migrator pod is stuck in invalid state however, that shouldn't affect any other running pods.
We are working on the fix for this.
Fix is out: signoz-0.35.1
If you had encountered dirty migration issue, you would need to cleanup
schema_migrations
tables prior to the upgrade. One-liner command:
Copy code
kubectl exec -it -n platform chi-my-release-clickhouse-cluster-0-0-0 -- sh -c "clickhouse-client --multiquery 'DROP TABLE signoz_traces.schema_migrations ON CLUSTER cluster; DROP TABLE signoz_metrics.schema_migrations ON CLUSTER cluster; DROP TABLE signoz_logs.schema_migrations ON CLUSTER cluster'"
Update
my-release
and
platform
with your release name and namespace.
w
Thank you, this resolved my issue.
🙌 1
p
Glad to know that the issue is resolved 🎉
507 Views