#8282 dnssec instance creation is racy
Closed: invalid 3 years ago by tjaalton. Opened 3 years ago by tjaalton.

I need to do this on Debian in order to verify that the instance is up before ods_policy_import:

--- a/ipaserver/install/opendnssecinstance.py
+++ b/ipaserver/install/opendnssecinstance.py
@@ -306,6 +306,9 @@ class OpenDNSSECInstance(service.Service):

     def __start(self):
         self.restart()  # needed to reload conf files
+        import time
+        while not os.path.exists('/run/opendnssec/enforcer.sock'):
+            time.sleep(1)
         tasks.run_ods_policy_import()
         if self.kasp_db_file:
             # regenerate zonelist.xml

IMHO this is the wrong approach. The ods-enforcerd.service should perform the wait operation and not signal readiness unless the socket is available.

[Service]
ExecStartPost=/bin/bash -c 'while [ ! -S /run/opendnssec/enforcer.sock ]; do sleep 0.5; done'

hmm right, didn't think of that

Metadata Update from @tjaalton:
- Issue close_status updated to: invalid
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata