mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Configure affinity during server installation
Write a new krb5.conf in case any values changed finding the right server to configure against (e.g. for CA, KRA) and ensure the API connection is to the remote server that will be installed against. When finding a CA or KRA during initial replica installation set the remote master as well. The order is: - existing server value in /etc/ipa/default.conf - the chosen CA host if the server doesn't provide one - the chosen KRA host if the server doesn't provide one This is more or less heirarchical. If a server is provided then that is considered first. If it provides all the optional services needed (CA and/or KRA) then it will be used. Otherwise it will fall back to a server that provides all the required services. In short, providing --server either at client install or with ipa-replica-install is no guarantee that it will define all topology. This may be unexpected behavior. For the case of adding a CA or KRA things are effectively unchanged. This type of install does not appear to be impacted by affinity issues. Fixes: https://pagure.io/freeipa/issue/9289 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -127,6 +127,8 @@ def find_providing_servers(svcname, conn=None, preferred_hosts=(), api=api):
|
||||
)
|
||||
else:
|
||||
servers.insert(0, host_name)
|
||||
logger.debug("Discovery: available servers for service '%s' are %s",
|
||||
svcname, ', '.join(servers))
|
||||
return servers
|
||||
|
||||
|
||||
@@ -143,8 +145,11 @@ def find_providing_server(svcname, conn=None, preferred_hosts=(), api=api):
|
||||
svcname, conn=conn, preferred_hosts=preferred_hosts, api=api
|
||||
)
|
||||
if not servers:
|
||||
logger.debug("Discovery: no '%s' service found.", svcname)
|
||||
return None
|
||||
else:
|
||||
logger.debug("Discovery: using %s for '%s' service",
|
||||
servers[0], svcname)
|
||||
return servers[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user