2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 11:30:23 +00:00

Cleanup pid on abnormal exit

If unlocking the security keys or loading the
plugins experiences an error, do not leave a
stale pid file behind.
This commit is contained in:
Jarrod Johnson 2015-07-28 10:53:15 -04:00
parent 5388f497d4
commit 6e5a7e15d9

View File

@ -129,8 +129,17 @@ def run():
configfile = "/etc/confluent/service.cfg"
config = ConfigParser.ConfigParser()
config.read(configfile)
_initsecurity(config)
confluentcore.load_plugins()
try:
_initsecurity(config)
except:
sys.stderr.write("Error unlocking credential store\n")
doexit()
sys.exit(1)
try:
confluentcore.load_plugins()
except:
doexit()
raise
_daemonize()
_updatepidfile()
auth.init_auth()