-
Notifications
You must be signed in to change notification settings - Fork 96
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
[runwsgi] Cannot override [DEFAULT] section entries from the command line #938
Comments
I am not sure if your expectation should be matched by a code change as it makes the code more complex for a use case which seems exotic to me. But let's see what others think. |
Well, I would have expected that command-line values have more precedence than config file options. For development at least I would like to quickly override a setting from the shell to test out the effect. Also something like this doesn't work: The workaround I used is to have a non defaulted http_port variable in the config, that is then provided on the command line, but that means that one has to always provide it. That is easily worked around by a wrapper script which sets it if not provided - but it sucks. I ran into this when I tried to run multiple workers for a zeo deployment and tried to instantiate them from a systemd template unit like this:
This is then instantiated by enabling systemd services like this: `systemd enable --now zms-$instance_name.zope@{8001..8006}.service Right now, this hands in the port via an environment variable and then calls a wrapper script that defaults that port to ensure that for debugging, the zope service can still be easily started on the default port manually. I thought it more intuitive if this was achievable by directly calling runwsgi for example. |
What I did:
Given a zope config like this:
I tried overriding that value from the command line by calling
runwsgi
like thisI expected the resulting server to run on port 8001 - but it didn't and instead ran on
DEFAULT.http_port
.What I expect to happen:
There should be a way to verride values from the command line while allowing a default value from the configuration file.
What actually happened:
Overriding not possible.
What version of Python and Zope/Addons I am using:
% python --version :( Python 3.6.8 % pip list |grep -i zope Zope 5.1.1.dev0 /Users/dwt/Code/Projekte/zope4/Zope/src
The text was updated successfully, but these errors were encountered: