From b9bc99e43ae7c364e5c3804d46efcb442da1dda4 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 15 Feb 2012 16:55:59 -0500 Subject: Enable ipa_memcached when upgrading Add support for autobind to services. This is a bit of a special case so I currently require the caller to specify ldapi separately. It only makes sense to do this only in upgrade cases. Also uninstall ipa_memcached when uninstalling the server. https://fedorahosted.org/freeipa/ticket/2399 --- install/tools/ipa-server-install | 1 + install/tools/ipa-upgradeconfig | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'install') diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index f7de5440..28436220 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -464,6 +464,7 @@ def uninstall(): httpinstance.HTTPInstance(fstore).uninstall() krbinstance.KrbInstance(fstore).uninstall() dsinstance.DsInstance(fstore=fstore).uninstall() + memcacheinstance.MemcacheInstance().uninstall() fstore.restore_all_files() try: os.remove(ANSWER_CACHE) diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig index 764b17c4..725a9d10 100644 --- a/install/tools/ipa-upgradeconfig +++ b/install/tools/ipa-upgradeconfig @@ -29,12 +29,15 @@ try: from ipaserver.install import installutils from ipaserver.install import dsinstance from ipaserver.install import httpinstance + from ipaserver.install import memcacheinstance from ipaserver.install import service + import ldap import krbV import re import os import shutil import fileinput + import ipalib.errors except ImportError: print >> sys.stderr, """\ There was a problem importing one of the required Python modules. The @@ -254,6 +257,15 @@ def main(): http = httpinstance.HTTPInstance() http.remove_httpd_ccache() + memcache = memcacheinstance.MemcacheInstance() + memcache.ldapi = True + memcache.realm = krbctx.default_realm + try: + if not memcache.is_configured(): + memcache.create_instance('MEMCACHE', fqdn, None, ipautil.realm_to_suffix(krbctx.default_realm)) + except (ldap.ALREADY_EXISTS, ipalib.errors.DuplicateEntry): + pass + try: if __name__ == "__main__": sys.exit(main()) -- cgit