mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make sure upgrade also checks for IPv6 stack
- Add check for IPv6 stack to upgrade process - Change IPv6 checker to also check that localhost resolves to ::1 Part of fixes https://pagure.io/freeipa/issue/7083 Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
committed by
Tomas Krizek
parent
faaba4f1bd
commit
dc47a4b85f
@@ -146,9 +146,22 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
|||||||
"""
|
"""
|
||||||
if not os.path.exists(paths.IF_INET6):
|
if not os.path.exists(paths.IF_INET6):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"IPv6 kernel module has to be enabled. If you do not wish to "
|
"IPv6 stack has to be enabled in the kernel and some "
|
||||||
"use IPv6, please disable it on the interfaces in "
|
"interface has to have ::1 address assigned. Typically "
|
||||||
"sysctl.conf and enable the IPv6 kernel module.")
|
"this is 'lo' interface. If you do not wish to use IPv6 "
|
||||||
|
"globally, disable it on the specific interfaces in "
|
||||||
|
"sysctl.conf except 'lo' interface.")
|
||||||
|
|
||||||
|
try:
|
||||||
|
localhost6 = ipautil.CheckedIPAddress('::1', allow_loopback=True)
|
||||||
|
if localhost6.get_matching_interface() is None:
|
||||||
|
raise ValueError("no interface for ::1 address found")
|
||||||
|
except ValueError:
|
||||||
|
raise RuntimeError(
|
||||||
|
"IPv6 stack is enabled in the kernel but there is no "
|
||||||
|
"interface that has ::1 address assigned. Add ::1 address "
|
||||||
|
"resolution to 'lo' interface. You might need to enable IPv6 "
|
||||||
|
"on the interface 'lo' in sysctl.conf.")
|
||||||
|
|
||||||
def restore_pre_ipa_client_configuration(self, fstore, statestore,
|
def restore_pre_ipa_client_configuration(self, fstore, statestore,
|
||||||
was_sssd_installed,
|
was_sssd_installed,
|
||||||
|
|||||||
@@ -1908,6 +1908,7 @@ def upgrade_configuration():
|
|||||||
def upgrade_check(options):
|
def upgrade_check(options):
|
||||||
try:
|
try:
|
||||||
installutils.check_server_configuration()
|
installutils.check_server_configuration()
|
||||||
|
tasks.check_ipv6_stack_enabled()
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
logger.error("%s", e)
|
logger.error("%s", e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user