-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
[BUG] Varken Crashes when ini is read only #146
Comments
Why not just use environment variables since you use k8s? And that is in place for a reason. if your config is incomplete you should be completing it yourself instead of having it fail if its read only |
I agree we should not crash but I disagree that Varken should continue to run. We should exit if we cannot write the config file if it is invalid. |
A) I don't use environment variables because I didn't know they were an option and I don't understand how they apply in this situation B) There may be some cases where the config file is invalid to the point of not being able to run, in this specific case (and the last couple of times this has happened), the problem is merely missing config blocks for services that aren't even enabled. In other words, the config is valid, you add support for a new service (ombi) and suddenly the config becomes invalid and varken starts crashing trying to rewrite the config file. This seems pretty unnecessary, no? |
Env vars are brand new so no harm no foul there! As for a new service, the block does not need to be there if the global is defined as false, but there does need to be a global server ids section for false. Maybe that is where the disconnect is? |
Well, in my current config I have this line:
and varken crashes with the error:
I feel like the global server id = 0 used to be sufficient, since it worked when I added this a while ago, but it no longer works that way. |
0 no longer works and an explicit false is required. This was changed in the last release |
I run Varken inside a kubernetes using its ConfigMap object to provide the actual config file, as a result of this the actual config file inside the docker image is read only (since it's being provided from another location). However, when varken detects a missing config stanza it attempts to rewrite the config file and this causes a crash since it can't open the file for writing.
Suggestion: if a config option is missing, attempt to rewrite the file but gracefully fail if this isn't possible and continue running with default values where possible. Since my case involves missing top level configs (ombi) it should be pretty ignorable.
The text was updated successfully, but these errors were encountered: