During uninstall we were asking useless questions about removing SRV and NS records from LDAP. An uninstall implies the LDAP repository will be wiped out anyway. Avoid asking these questions and just let the dirsrv uninstall code remove all contents.
Simo. -- Simo Sorce * Red Hat, Inc * New York
>From 1e41c2c215e4afc1bf7b50aa7a1cb34effaf953d Mon Sep 17 00:00:00 2001 From: Simo Sorce <sso...@redhat.com> Date: Wed, 6 Oct 2010 10:16:54 -0400 Subject: [PATCH] install-script: Do not ask to remove DNS data When we uninstall we wipe out the entire LDAP database, so it doesn't really make mush sense to try to also remove single entries from it. This avoids the --uninstall procedure to fail because the DM password is not available or the LDAP server is down, and we are just trying to cleanup everything. --- install/tools/ipa-server-install | 23 ++++------------------- 1 files changed, 4 insertions(+), 19 deletions(-) diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 6378628..01fe935 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -378,9 +378,7 @@ def check_dirsrv(unattended): print "\t636" sys.exit(1) -def uninstall(dm_password=None): - if dm_password: - api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password) +def uninstall(): try: (stdout, stderr, rc) = run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--uninstall"], raiseonerr=False) @@ -390,6 +388,7 @@ def uninstall(dm_password=None): 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(): @@ -465,7 +464,6 @@ def main(): ) if options.uninstall: - dm_password = options.dm_password # We will need at least api.env, finalize api now. This system is # already installed, so the configuration file is there. @@ -478,21 +476,8 @@ def main(): print "" print "Aborting uninstall operation." sys.exit(1) - if not dm_password: - if user_input("Do you want to remove old SRV and NS records?", False): - dm_password = read_password("Directory Manager", confirm=False, validate=False) - # Try out the password - ldapuri = 'ldap://%s' % api.env.host - try: - conn = ldap2(shared_instance=False, ldap_uri=ldapuri) - conn.connect(bind_dn='cn=directory manager', bind_pw=dm_password) - except errors.ACIError: - sys.exit("\nThe password provided is incorrect for LDAP server %s" % api.env.host) - except errors.ExecutionError: - sys.exit("\nUnable to connect to LDAP server %s" % api.env.host) - conn.disconnect() - - return uninstall(dm_password) + + return uninstall() # This will override any settings passed in on the cmdline options._update_loose(read_cache()) -- 1.7.2.3
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel