-
Notifications
You must be signed in to change notification settings - Fork 363
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
Different behavior of varnishd -C in varnish 5 #2316
Comments
Something to add. Probably not all other options should be ignored. If you e.g. specify |
Thanks @mookie-. That should be clear and was already discussed. See the other issues I referenced. |
Is there any update on this? Will this be fixed in next release? |
This is a more complex problem than it looks, I'll try to summarize it here: Some of the symbols available in VCL depend on the Those options are needed on the One possibility we discussed was to ignore the options, and even allow to omit them. The So the next solution would be to require the same command line, but in I believe this is what we are supposed to do, but at this point I don't know our progress. I may have missed further discussions during the holidays season but to my knowledge this hasn't been discussed in a while. Current master doesn't enforce |
After @dridi explained the nitty gritty details, we agreed that if |
I am going to kill this ticket, because what is being asked for is patently not possible in general and would lead to tons and tons of ugly workarounds. It would for instance be easy to add "pretend" code to -a arguments, but it would be wrong, because only by binding the socket do we actually get its IP and port number in the weird corner cases of FreeBSD-jails or :0 -C is for test-compiling VCL code (and seeing the resulting C source) it is not a flag for testing the rest of the arguments. |
Due to varnishcache/varnish-cache#2316 we cannot reliably config-test the VCL in the init-script. If users want to configtest the VCL in advance of a restart, this can be done with loading the new VCL into the running varnish, or running ``varnishd -C`` with a different option-set that will not conflict with the running instance(s).
Expected Behavior
If I run
varnishd -C -f /etc/varnish/varnish.vcl -a 127.0.0.1:80 [...]
varnishd should ignored the other options except "-C -f"Current Behavior
On varnishd <5 it works. On varnishd >5 I get
Error: Could not get socket 127.0.0.1:80: Address already in use
Possible Solution
Make it like before or note it in the changes/upgrade documentation.
Steps to Reproduce (for bugs)
varnishd -C -f /etc/varnish/varnish.vcl -a $ip:$port
Error: Could not get socket $ip:$port: Address already in use
Context
varnishd -C -f $all_other_varnish_options
is used as configuration check in (some/many) init scripts.Did work at least for varnish 3 and 4.
Your Environment
The text was updated successfully, but these errors were encountered: