Remove network and broadcast address warnings

We cannot reliably determine when an IP Address is network or broadcast.
We allowed to use non-local IP addresses due container use cases, we
don't know subnets of used IP addresses.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Martin Basti 2017-06-15 10:27:55 +02:00 committed by David Kupka
parent 1b8dc1131c
commit f3537297be
5 changed files with 1 additions and 39 deletions

View File

@ -38,8 +38,6 @@ from ipalib.install.kinit import kinit_keytab, kinit_password
from ipalib.install.service import enroll_only, prepare_only from ipalib.install.service import enroll_only, prepare_only
from ipalib.rpc import delete_persistent_client_session_data from ipalib.rpc import delete_persistent_client_session_data
from ipalib.util import ( from ipalib.util import (
broadcast_ip_address_warning,
network_ip_address_warning,
normalize_hostname, normalize_hostname,
no_matching_interface_for_ip_address_warning, no_matching_interface_for_ip_address_warning,
verify_host_resolvable, verify_host_resolvable,
@ -1299,8 +1297,6 @@ def update_dns(server, hostname, options):
root_logger.info("Failed to determine this machine's ip address(es).") root_logger.info("Failed to determine this machine's ip address(es).")
return return
network_ip_address_warning(update_ips)
broadcast_ip_address_warning(update_ips)
no_matching_interface_for_ip_address_warning(update_ips) no_matching_interface_for_ip_address_warning(update_ips)
update_txt = "debug\n" update_txt = "debug\n"

View File

@ -1110,26 +1110,6 @@ def check_principal_realm_in_trust_namespace(api_instance, *keys):
'namespace')) 'namespace'))
def network_ip_address_warning(addr_list):
for ip in addr_list:
if ip.is_network_addr():
root_logger.warning("IP address %s might be network address", ip)
# fixme: once when loggers will be fixed, we can remove this
# print
print("WARNING: IP address {} might be network address".format(ip),
file=sys.stderr)
def broadcast_ip_address_warning(addr_list):
for ip in addr_list:
if ip.is_broadcast_addr():
root_logger.warning("IP address %s might be broadcast address", ip)
# fixme: once when loggers will be fixed, we can remove this
# print
print("WARNING: IP address {} might be broadcast address".format(
ip), file=sys.stderr)
def no_matching_interface_for_ip_address_warning(addr_list): def no_matching_interface_for_ip_address_warning(addr_list):
for ip in addr_list: for ip in addr_list:
if not ip.get_matching_interface(): if not ip.get_matching_interface():

View File

@ -264,8 +264,6 @@ def install_check(standalone, api, replica, options, hostname):
ip_addresses = get_server_ip_address(hostname, options.unattended, ip_addresses = get_server_ip_address(hostname, options.unattended,
True, options.ip_addresses) True, options.ip_addresses)
util.network_ip_address_warning(ip_addresses)
util.broadcast_ip_address_warning(ip_addresses)
util.no_matching_interface_for_ip_address_warning(ip_addresses) util.no_matching_interface_for_ip_address_warning(ip_addresses)
if not options.forward_policy: if not options.forward_policy:

View File

@ -27,8 +27,6 @@ from ipalib import api, errors, x509
from ipalib.constants import DOMAIN_LEVEL_0 from ipalib.constants import DOMAIN_LEVEL_0
from ipalib.util import ( from ipalib.util import (
validate_domain_name, validate_domain_name,
network_ip_address_warning,
broadcast_ip_address_warning,
no_matching_interface_for_ip_address_warning, no_matching_interface_for_ip_address_warning,
) )
import ipaclient.install.ntpconf import ipaclient.install.ntpconf
@ -616,8 +614,6 @@ def install_check(installer):
options.ip_addresses) options.ip_addresses)
# check addresses here, dns module is doing own check # check addresses here, dns module is doing own check
network_ip_address_warning(ip_addresses)
broadcast_ip_address_warning(ip_addresses)
no_matching_interface_for_ip_address_warning(ip_addresses) no_matching_interface_for_ip_address_warning(ip_addresses)
if options.setup_adtrust: if options.setup_adtrust:

View File

@ -32,11 +32,7 @@ from ipaplatform.tasks import tasks
from ipaplatform.paths import paths from ipaplatform.paths import paths
from ipalib import api, constants, create_api, errors, rpc, x509 from ipalib import api, constants, create_api, errors, rpc, x509
from ipalib.config import Env from ipalib.config import Env
from ipalib.util import ( from ipalib.util import no_matching_interface_for_ip_address_warning
network_ip_address_warning,
broadcast_ip_address_warning,
no_matching_interface_for_ip_address_warning,
)
from ipaclient.install.client import configure_krb5_conf, purge_host_keytab from ipaclient.install.client import configure_krb5_conf, purge_host_keytab
from ipaserver.install import ( from ipaserver.install import (
adtrust, bindinstance, ca, certs, dns, dsinstance, httpinstance, adtrust, bindinstance, ca, certs, dns, dsinstance, httpinstance,
@ -852,8 +848,6 @@ def install_check(installer):
options.ip_addresses) options.ip_addresses)
# check addresses here, dns module is doing own check # check addresses here, dns module is doing own check
network_ip_address_warning(config.ips)
broadcast_ip_address_warning(config.ips)
no_matching_interface_for_ip_address_warning(config.ips) no_matching_interface_for_ip_address_warning(config.ips)
if options.setup_adtrust: if options.setup_adtrust:
@ -1285,8 +1279,6 @@ def promote_check(installer):
False, options.ip_addresses) False, options.ip_addresses)
# check addresses here, dns module is doing own check # check addresses here, dns module is doing own check
network_ip_address_warning(config.ips)
broadcast_ip_address_warning(config.ips)
no_matching_interface_for_ip_address_warning(config.ips) no_matching_interface_for_ip_address_warning(config.ips)
if options.setup_adtrust: if options.setup_adtrust: