Bug 1826233 - ods-enforcerd.service should wait until socket is ready
Summary: ods-enforcerd.service should wait until socket is ready
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: opendnssec
Version: 32
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Paul Wouters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-21 09:43 UTC by Christian Heimes
Modified: 2020-12-19 18:24 UTC (History)
4 users (show)

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:
Clone Of:
Environment:
Last Closed: 2020-12-16 21:43:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure freeipa issue 8282 0 None None None 2020-04-21 09:44:16 UTC

Description Christian Heimes 2020-04-21 09:43:59 UTC
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

Comment 1 Fedora Update System 2020-12-09 03:42:29 UTC
FEDORA-2020-540fe8c016 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-540fe8c016

Comment 2 Fedora Update System 2020-12-09 03:42:57 UTC
FEDORA-2020-1f39b24f23 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-1f39b24f23

Comment 3 Fedora Update System 2020-12-10 23:49:43 UTC
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.

Comment 4 Fedora Update System 2020-12-11 00:03:53 UTC
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.

Comment 5 Fedora Update System 2020-12-16 21:43:17 UTC
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.

Comment 6 Fedora Update System 2020-12-18 01:09:38 UTC
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.

Comment 7 Fedora Update System 2020-12-18 02:06:38 UTC
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.

Comment 8 Fedora Update System 2020-12-19 18:24:11 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.