Bug 1826233
| Summary: | ods-enforcerd.service should wait until socket is ready | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Christian Heimes <cheimes> |
| Component: | opendnssec | Assignee: | Paul Wouters <pwouters> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | low | ||
| Version: | 32 | CC: | abokovoy, puiterwijk, pvrabec, pwouters |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | opendnssec-2.1.7-2.eln108 opendnssec-2.1.7-2.fc33 opendnssec-2.1.7-2.fc32 opendnssec-2.1.7-3.fc34 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-12-16 21:43:17 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: | |||
FEDORA-2020-540fe8c016 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-540fe8c016 FEDORA-2020-1f39b24f23 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-1f39b24f23 FEDORA-2020-1f39b24f23 has been pushed to the Fedora 32 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-1f39b24f23` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-1f39b24f23 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-540fe8c016 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-540fe8c016` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-540fe8c016 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-f856f37388 has been pushed to the Fedora ELN stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-540fe8c016 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-1f39b24f23 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-8b0b8fb26a has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. |
Description of problem: ods-enforcerd.service is a forking service. The services creates and listens on the Unix socket /run/opendnssec/enforcer.sock. systemd will continue starting depending services as soon as the ods-enforcer daemon is forked off. It doesn't wait until the daemon is ready to handle requests. This is racy and cause errors. Version-Release number of selected component (if applicable): opendnssec-2.1.6-5.fc32 How reproducible: sometimes (race condition) Additional info: The service unit should not indicate readiness until the socket is available. There are several options: * ods-enforcerd chould use sd-notify API, but this would require several changes to the code. * systemd could block until the socket is ready. This approach is simpler. Since ods-enforcerd removes the socket file on shutdown, an ExecStartPost hook that waits for the socket should do the trick: [Service] ExecStartPost=/bin/bash -c 'while [ ! -S /run/opendnssec/enforcer.sock ]; do sleep 1; echo "Waiting for socket"; done' TimeoutStartSec=20