Only warn when specified server IP addresses don't match intf

In containers local addresses differ from public addresses and we need
a way to provide only public address to installers.

https://pagure.io/freeipa/issue/2715
https://pagure.io/freeipa/issue/4317

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
Martin Basti
2017-05-31 15:50:05 +02:00
parent 566361e63d
commit 6637980af6
8 changed files with 59 additions and 32 deletions

View File

@@ -281,7 +281,7 @@ def read_ip_addresses():
if not ip:
break
try:
ip_parsed = ipautil.CheckedIPAddress(ip, match_local=True)
ip_parsed = ipautil.CheckedIPAddress(ip)
except Exception as e:
print("Error: Invalid IP Address %s: %s" % (ip, e))
continue
@@ -590,7 +590,7 @@ def get_server_ip_address(host_name, unattended, setup_dns, ip_addresses):
if len(hostaddr):
for ha in hostaddr:
try:
ips.append(ipautil.CheckedIPAddress(ha, match_local=True))
ips.append(ipautil.CheckedIPAddress(ha, match_local=False))
except ValueError as e:
root_logger.warning("Invalid IP address %s for %s: %s", ha, host_name, unicode(e))