Make sure messagebus is running prior to starting certmonger.

ticket 1580
This commit is contained in:
Jan Cholasta 2011-08-09 12:37:56 +02:00 committed by Rob Crittenden
parent cc86c1459b
commit 1ec531469e
3 changed files with 12 additions and 2 deletions

View File

@ -826,8 +826,6 @@ def main():
# Now put the CA cert where other instances exepct it # Now put the CA cert where other instances exepct it
ca.publish_ca_cert("/etc/ipa/ca.crt") ca.publish_ca_cert("/etc/ipa/ca.crt")
service.start('messagebus')
# Create a directory server instance # Create a directory server instance
ds = dsinstance.DsInstance(fstore=fstore) ds = dsinstance.DsInstance(fstore=fstore)

View File

@ -182,6 +182,11 @@ def uninstall(options, env):
# Always start certmonger. We can't untrack something if it isn't # Always start certmonger. We can't untrack something if it isn't
# running # running
try:
ipautil.service_start('messagebus')
except Exception, e:
logging.error("messagebus failed to start: %s" % str(e))
try: try:
ipautil.service_start('certmonger') ipautil.service_start('certmonger')
except Exception, e: except Exception, e:
@ -493,6 +498,11 @@ def configure_certmonger(fstore, subject_base, cli_realm, hostname, options):
started = True started = True
principal = 'host/%s@%s' % (hostname, cli_realm) principal = 'host/%s@%s' % (hostname, cli_realm)
try:
ipautil.service_start('messagebus')
except Exception, e:
logging.error("messagebus failed to start: %s" % str(e))
# Ensure that certmonger has been started at least once to generate the # Ensure that certmonger has been started at least once to generate the
# cas files in /var/lib/certmonger/cas. # cas files in /var/lib/certmonger/cas.
try: try:

View File

@ -484,6 +484,7 @@ class CertDB(object):
Tell certmonger to track the given certificate nickname. Tell certmonger to track the given certificate nickname.
""" """
service.chkconfig_on("certmonger") service.chkconfig_on("certmonger")
service.start("messagebus")
service.start("certmonger") service.start("certmonger")
try: try:
(stdout, stderr, rc) = certmonger.start_tracking(nickname, self.secdir, password_file) (stdout, stderr, rc) = certmonger.start_tracking(nickname, self.secdir, password_file)
@ -513,6 +514,7 @@ class CertDB(object):
# Always start certmonger. We can't untrack something if it isn't # Always start certmonger. We can't untrack something if it isn't
# running # running
service.start("messagebus")
service.start("certmonger") service.start("certmonger")
try: try:
certmonger.stop_tracking(self.secdir, nickname=nickname) certmonger.stop_tracking(self.secdir, nickname=nickname)