mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
IPA Server check in ipa-replica-manage
When executing ipa-replica-manage connect to an master that raises NotFound error we now check if the master is at least IPA server. If so, we inform the user that it is probably foreign or previously deleted master. If not, we inform the user that the master is not an IPA server at all. https://fedorahosted.org/freeipa/ticket/3105
This commit is contained in:
committed by
Rob Crittenden
parent
fe66fbe637
commit
e7c99e7d21
@@ -810,6 +810,19 @@ def is_host_resolvable(fqdn):
|
||||
|
||||
return False
|
||||
|
||||
def host_exists(host):
|
||||
"""
|
||||
Resolve the host to see if it exists.
|
||||
|
||||
Returns True/False
|
||||
"""
|
||||
try:
|
||||
socket.getaddrinfo(host, 80)
|
||||
except socket.gaierror:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def get_ipa_basedn(conn):
|
||||
"""
|
||||
Get base DN of IPA suffix in given LDAP server.
|
||||
|
||||
Reference in New Issue
Block a user