k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.49k stars 226 forks source link

Attempt to continue when encountering errors in createDBIfNotExist #258

Closed mortenlj closed 6 months ago

mortenlj commented 6 months ago

The database might already exist even if we encounter errors in createDBIfNotExist, so instead of erroring out, log warnings and attempt to continue.

Fixes https://github.com/k3s-io/k3s/issues/9033

mortenlj commented 6 months ago

I am pretty sure this will crash on error as-is.

You are entirely right, not sure how I missed that. Serves me right for trying to crank it out just before bedtime :slightly_smiling_face:.

I'll take another pass over this today if I get the time.

mortenlj commented 6 months ago

@brandond I think I'm happy with this now, anything you think should be changed?