From f87bd57c1d3a86ade7419ea17ddee65bacda4b7f Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 31 Aug 2010 17:21:25 -0400 Subject: Fix certmonger errors when doing a client or server uninstall. This started with the client uninstaller returning a 1 when not installed. There was no way to tell whether the uninstall failed or the client simply wasn't installed which caused no end of grief with the installer. This led to a lot of certmonger failures too, either trying to stop tracking a non-existent cert or not handling an existing tracked certificate. I moved the certmonger code out of the installer and put it into the client/server shared ipapython lib. It now tries a lot harder and smarter to untrack a certificate. ticket 142 --- install/tools/ipa-server-install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 89bb83e3..a62f8af4 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -381,11 +381,12 @@ def uninstall(dm_password=None): api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password) try: - run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--uninstall"]) + (stdout, stderr, rc) = run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--uninstall"], raiseonerr=False) + if rc != 2: + raise RuntimeError(stdout) except Exception, e: print "Uninstall of client side components failed!" print "ipa-client-install returned: " + str(e) - pass ntpinstance.NTPInstance(fstore).uninstall() if cainstance.CADSInstance().is_configured(): -- cgit