Make sure 389-ds is running when adding memcache service in upgrade.

Adding the memcache service requires 389-ds to be running because we
add an entry to cn=masters.

https://fedorahosted.org/freeipa/ticket/2411
This commit is contained in:
Rob Crittenden
2012-02-25 19:08:17 -05:00
parent de9a22b3f3
commit 357cb654fa

View File

@@ -275,6 +275,10 @@ def main():
memcache.realm = krbctx.default_realm
try:
if not memcache.is_configured():
# 389-ds needs to be running to create the memcache instance
# because we record the new service in cn=masters.
ds = dsinstance.DsInstance()
ds.start()
memcache.create_instance('MEMCACHE', fqdn, None, ipautil.realm_to_suffix(krbctx.default_realm))
except (ldap.ALREADY_EXISTS, ipalib.errors.DuplicateEntry):
pass