mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Move Managed Entries into their own container in the replicated space.
Repoint cn=Managed Entries,cn=plugins,cn=config in common_setup Create: cn=Managed Entries,cn=etc,$SUFFIX Create: cn=Definitions,cn=Managed Entries,cn=etc,$SUFFIX Create: cn=Templates,cn=Managed Entries,cn=etc,$SUFFIX Create method for dynamically migrating any and all custom Managed Entries from the cn=config space into the new container. Separate the connection creation during update so that a restart can be performed to initialize changes before performing a delete. Add wait_for_open_socket() method in installutils https://fedorahosted.org/freeipa/ticket/1708
This commit is contained in:
committed by
Rob Crittenden
parent
a40d4d4d64
commit
8b3336ef55
@@ -441,6 +441,27 @@ def wait_for_open_ports(host, ports, timeout=0):
|
||||
else:
|
||||
raise e
|
||||
|
||||
def wait_for_open_socket(socket_name, timeout=0):
|
||||
"""
|
||||
Wait until the specified socket on the local host is open. Timeout
|
||||
in seconds may be specified to limit the wait.
|
||||
"""
|
||||
op_timeout = time.time() + timeout
|
||||
|
||||
while True:
|
||||
try:
|
||||
s = socket.socket(socket.AF_UNIX)
|
||||
s.connect(socket_name)
|
||||
s.close()
|
||||
break;
|
||||
except socket.error, e:
|
||||
if e.errno == 111: # 111: Connection refused
|
||||
if timeout and time.time() > op_timeout: # timeout exceeded
|
||||
raise e
|
||||
time.sleep(1)
|
||||
else:
|
||||
raise e
|
||||
|
||||
def resolve_host(host_name):
|
||||
try:
|
||||
addrinfos = socket.getaddrinfo(host_name, None,
|
||||
|
||||
Reference in New Issue
Block a user