Bug 1464355
Summary: | Starting varnishncsa during boot fails | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Gerald Vogt <vogt> |
Component: | varnish | Assignee: | Ingvar Hagelund <ingvar> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | epel7 | CC: | dridi.boukelmoune, ingvar |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-02-24 10:44:55 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Gerald Vogt
2017-06-23 08:28:33 UTC
The problem here is that varnishncsa starts too fast, that is, before varnishd has gotten around to open its vsm file. A simple workaround could be just to add a pause to the startup of varnishd like "ExecStartPost=sleep 5" in varnish.service, or just make varnishncsa try restarting until it succeeds, that is "Restart=on-failure" in varnishncsa.service. A more correct solution would be to figure out some systemd probe-able resource that is not available before varnishd has started proberly, and make varnishncsa wait for that. I've got to look more into this, and ask upstream. Ingvar Upstream issue: https://github.com/varnishcache/pkg-varnish-cache/issues/79 I closed the upstream issue because as far as we are concerned, 4.0 is EOL and the verdict is WONTFIX. There's no easy workaround until 4.1 (enabled by default). 5.2 finishes daemonizing when varnishd is completely ready and shouldn't need any workaround. I'm closing this as WONTFIX, as it is a corner case, and I can't get an upstream fix. If anybody else reaches this, a workaround might be something along one of these two: ## Make systemd wait 5s after varnishd has started before starting varnishncsa # mkdir -p /etc/systemd/system/varnish.service.d # echo -e '[Service]\nExecStartPost=sleep 5' > /etc/systemd/system/varnish.service.d/wait_for_vsm_open.conf # systemctl daemon-reload ## OR ## Make varnishncsa restart until varnishd answers # mkdir -p /etc/systemd/system/varnishncsa.service.d # echo -e '[Service]\nRestart=on-failure\nRestartSec=5' > /etc/systemd/system/varnishncsa.service.d/restart.conf # systemctl daemon-reload |