-
Notifications
You must be signed in to change notification settings - Fork 218
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
Wired flipt.db init #963
Comments
@ognif thanks for the issue! i'll try to reproduce and see if I can come up with a fix. Can you share part of your pvc/volume k8s config so that I could potentially reproduce? Are you using the helm chart or just normal k8s config? (the helm chart would likely have the same problem but just wanted to double check) |
@markphelps I have added a zip file with my version of the helm flipt chart. |
@ognif I have a PR up in the helm-charts repo to support PV/C. Let me know if you think it would work for you flipt-io/helm-charts#2 |
@markphelps thank you for your pr but please explain what this helm pr will solve the software bug?
As written before, I think it is a bug inside the software because the software will not write the flipt.db to the mounted path and so finaly the software cannot find the not existing database. |
My apologies. Previously the Flipt helm chart was not even accounting for persistent volumes because it was not mounting them to the correct location in the container I will try to use the latest version of the chart tonight and use the longhorn storage class like yours. Then I will be able to more easily see why it can't create the file. |
@markphelps I have the exact same problem with Azure managed-premium storage class. |
@ognif what are the permissions on your mounted volume/path? I tried running flipt and mounting a volume on my local machine with the following:
And it ran fine. The Here are the permissions of that folder and contents:
I wonder if you may be running into permissions issues creating this file because the user that runs Flipt in the container is a non-root user, although this user should have r/w permissions to the mounted folder. |
The daily discussion "But it works local". After all, Kubernetes is not local. So I ask you to test your software in a Kubernetes cluster. Persistence is inevitable inside a cluster. |
@ognif could you do me a favor and run with the log:
level: DEBUG or set it as an environment variable for the container using When flipt starts up it checks to see if any DB migrations need to be performed, and on first run (or if flipt.db doesnt exist when running with SQLite) it will try to perform a migration. I think what may be going on in your case is that flipt is trying to perform the migrations before the volume is ready/writeable? Its hard for me to reproduce this currently as I dont have a cluster running with |
@ognif can you try upgrading to either v1.9.1 or v1.10.1 and see if this resolves the issue? |
flipt:latest
kubernets cluster
If I start flipt in our cluster without any modification, the flipt service starts without any problem. After looking into /var/opt/flipt there is a file flipt.db.
Doing the same with a mounted pvc/volume, flipt is starting with an error.
Using an init container I see hat the flipt.db is not existing while startup the container. It looks like the flipt.db file is created on startup.
So I assume flipt is creating the flipt.db on startup. BUT it will not create this file inside the mounted volume.
Maybe flipt expect a mounted volume as an external database and will not create flipt.db?
Because the file flipt.db is not existing on pod startup, I also cannot use an init container as workaround to copy the file to the mounted volume.
The text was updated successfully, but these errors were encountered: