mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
DNSSEC: fix traceback during shutdown phase
ipa-dnskeysyncd causes traceback when receive SIGTERM, SIGINT Ticket: https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
parent
bb6c0b9c63
commit
f763b137ee
@ -22,6 +22,17 @@ from ipaplatform.paths import paths
|
||||
|
||||
from ipapython.dnssec.keysyncer import KeySyncer
|
||||
|
||||
# IPA framework initialization
|
||||
api.bootstrap(in_server=True, log=None) # no logging to file
|
||||
api.finalize()
|
||||
standard_logging_setup(verbose=True, debug=api.env.debug)
|
||||
log = root_logger
|
||||
#log.addHandler(systemd.journal.JournalHandler())
|
||||
|
||||
# Global state
|
||||
watcher_running = True
|
||||
ldap_connection = False
|
||||
|
||||
DAEMONNAME = 'ipa-dnskeysyncd'
|
||||
PRINCIPAL = None # not initialized yet
|
||||
WORKDIR = '/tmp' # private temp
|
||||
@ -47,21 +58,10 @@ def commenceShutdown(signum, stack):
|
||||
|
||||
os.umask(007)
|
||||
|
||||
# Global state
|
||||
watcher_running = True
|
||||
ldap_connection = False
|
||||
|
||||
# Signal handlers
|
||||
signal.signal(signal.SIGTERM, commenceShutdown)
|
||||
signal.signal(signal.SIGINT, commenceShutdown)
|
||||
|
||||
# IPA framework initialization
|
||||
api.bootstrap(in_server=True, log=None) # no logging to file
|
||||
api.finalize()
|
||||
standard_logging_setup(verbose=True, debug=api.env.debug)
|
||||
log = root_logger
|
||||
#log.addHandler(systemd.journal.JournalHandler())
|
||||
|
||||
# Kerberos initialization
|
||||
PRINCIPAL = str('%s/%s' % (DAEMONNAME, api.env.host))
|
||||
log.debug('Kerberos principal: %s', PRINCIPAL)
|
||||
|
Loading…
Reference in New Issue
Block a user