summaryrefslogtreecommitdiffstats
path: root/install/tools
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-02-15 16:55:59 -0500
committerMartin Kosek <mkosek@redhat.com>2012-02-16 14:43:08 +0100
commitb9bc99e43ae7c364e5c3804d46efcb442da1dda4 (patch)
tree54e41bb693cb87fc01a9c0cf7bff444b509b4052 /install/tools
parent0c6e04712899d879ddbe63f957bbf6d866fd2b70 (diff)
downloadfreeipa-b9bc99e43ae7c364e5c3804d46efcb442da1dda4.tar.gz
freeipa-b9bc99e43ae7c364e5c3804d46efcb442da1dda4.tar.xz
freeipa-b9bc99e43ae7c364e5c3804d46efcb442da1dda4.zip
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
Diffstat (limited to 'install/tools')
-rwxr-xr-xinstall/tools/ipa-server-install1
-rw-r--r--install/tools/ipa-upgradeconfig12
2 files changed, 13 insertions, 0 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index f7de54403..284362206 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 764b17c42..725a9d106 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())