From 704732630cbb466c00b0d49a88a016ed7f861c63 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Aug 19 2011 00:16:01 +0000 Subject: Make sure messagebus is running prior to starting certmonger. ticket 1580 --- diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 3605b03..411324b 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -826,8 +826,6 @@ def main(): # Now put the CA cert where other instances exepct it ca.publish_ca_cert("/etc/ipa/ca.crt") - service.start('messagebus') - # Create a directory server instance ds = dsinstance.DsInstance(fstore=fstore) diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 1caf9c1..fe4e1e4 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -183,6 +183,11 @@ def uninstall(options, env): # Always start certmonger. We can't untrack something if it isn't # running try: + ipautil.service_start('messagebus') + except Exception, e: + logging.error("messagebus failed to start: %s" % str(e)) + + try: ipautil.service_start('certmonger') except Exception, e: logging.error("certmonger failed to start: %s" % str(e)) @@ -493,6 +498,11 @@ def configure_certmonger(fstore, subject_base, cli_realm, hostname, options): started = True 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 # cas files in /var/lib/certmonger/cas. try: diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py index 738b329..f14efe3 100644 --- a/ipaserver/install/certs.py +++ b/ipaserver/install/certs.py @@ -484,6 +484,7 @@ class CertDB(object): Tell certmonger to track the given certificate nickname. """ service.chkconfig_on("certmonger") + service.start("messagebus") service.start("certmonger") try: (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 # running + service.start("messagebus") service.start("certmonger") try: certmonger.stop_tracking(self.secdir, nickname=nickname)