Bug 1829071
| Summary: | Installation of RHDS 11 fails on RHEL8 server with IPv6 disabled | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Hemant B Khot <hkhot> | |
| Component: | 389-ds-base | Assignee: | mreynolds | |
| Status: | CLOSED ERRATA | QA Contact: | RHDS QE <ds-qe-bugs> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 8.2 | CC: | bsmejkal, msauton, pasik, spichugi, tbordaz, tmihinto, toneata, vashirov | |
| Target Milestone: | rc | Keywords: | ZStream | |
| Target Release: | 8.3 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | 389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766 | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: Installing DS on a system where IPv6 is completely disabled
Consequence: Instance creation fails
Fix: Remove the expectation/dependency on having IPv6 enabled
Result: A server instance can be created when IPv6 is disabled.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1852049 (view as bug list) | Environment: | ||
| Last Closed: | 2020-11-04 03:07:52 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1852049 | |||
|
Description
Hemant B Khot
2020-04-28 20:16:18 UTC
[root@rhds ~]# dsctl --remove-all
Are you sure you want to remove all the Directory Server instances? Enter "Yes" to continue: Yes
Removing instance: slapd-test
All instances have been successfully removed
[root@rhds ~]# vi /etc/default/grub
[root@rhds ~]# ls -lh /etc/grub*.cfg
lrwxrwxrwx. 1 root root 22 Sep 26 2019 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
[root@rhds ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
done
[root@rhds ~]# grep -i ipv6 /etc/default/grub
GRUB_CMDLINE_LINUX="console=ttyS0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto ipv6.disable=1"
[root@rhds ~]#
[root@rhds ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Generating grub configuration file ...
done
[root@rhds ~]# reboot
+++++++++++++
[root@rhds ~]# dscreate -v from-file test.inf
DEBUG: The 389 Directory Server Creation Tool
DEBUG: Inspired by works of: ITS, The University of Adelaide
DEBUG: Called with: Namespace(dryrun=False, file='test.inf', func=<function instance_create at 0x7fdeb4238f28>, verbose=True)
DEBUG: Running setup with verbose
DEBUG: Using inf from test.inf
DEBUG: Configuration ['general', 'slapd', 'backend-userroot']
DEBUG: general:config_version not in inf, using default
DEBUG: general:strict_host_checking not in inf, using default
DEBUG: general:selinux not in inf, using default
DEBUG: general:systemd not in inf, using default
DEBUG: general:start not in inf, using default
DEBUG: general:defaults not in inf, using default
DEBUG: Configuration general {'config_version': 2, 'full_machine_name': 'rhds.hkhot.local', 'strict_host_checking': False, 'selinux': True, 'systemd': True, 'start': True, 'defaults': '999999999'}
DEBUG: slapd:user not in inf, using default
DEBUG: slapd:group not in inf, using default
DEBUG: slapd:prefix not in inf, using default
DEBUG: slapd:self_sign_cert not in inf, using default
DEBUG: slapd:self_sign_cert_valid_months not in inf, using default
DEBUG: slapd:bin_dir not in inf, using default
DEBUG: slapd:sbin_dir not in inf, using default
DEBUG: slapd:sysconf_dir not in inf, using default
DEBUG: slapd:initconfig_dir not in inf, using default
DEBUG: slapd:data_dir not in inf, using default
DEBUG: slapd:local_state_dir not in inf, using default
DEBUG: slapd:lib_dir not in inf, using default
DEBUG: slapd:cert_dir not in inf, using default
DEBUG: slapd:config_dir not in inf, using default
DEBUG: slapd:inst_dir not in inf, using default
DEBUG: slapd:backup_dir not in inf, using default
DEBUG: slapd:db_dir not in inf, using default
DEBUG: slapd:ldif_dir not in inf, using default
DEBUG: slapd:lock_dir not in inf, using default
DEBUG: slapd:log_dir not in inf, using default
DEBUG: slapd:run_dir not in inf, using default
DEBUG: slapd:schema_dir not in inf, using default
DEBUG: slapd:tmp_dir not in inf, using default
DEBUG: Configuration slapd {'self_sign_cert': True, 'root_dn': 'cn=directory manager', 'port': 389, 'secure_port': 636, 'self_sign_cert_valid_months': 24, 'user': 'dirsrv', 'instance_name': 'test', 'group': 'dirsrv', 'root_password': 'geheim4test', 'initconfig_dir': '/etc/sysconfig', 'prefix': '/usr', 'bin_dir': '/usr/bin', 'sbin_dir': '/usr/sbin', 'sysconf_dir': '/etc', 'data_dir': '/usr/share', 'local_state_dir': '/var', 'lib_dir': '/usr/lib64', 'cert_dir': '/etc/dirsrv/slapd-test', 'config_dir': '/etc/dirsrv/slapd-test', 'inst_dir': '/usr/lib64/dirsrv/slapd-test', 'backup_dir': '/var/lib/dirsrv/slapd-test/bak', 'db_dir': '/var/lib/dirsrv/slapd-test/db', 'ldif_dir': '/var/lib/dirsrv/slapd-test/ldif', 'lock_dir': '/var/lock/dirsrv/slapd-test', 'log_dir': '/var/log/dirsrv/slapd-test', 'run_dir': '/var/run/dirsrv', 'schema_dir': '/etc/dirsrv/slapd-test/schema', 'tmp_dir': '/tmp'}
DEBUG: backend-userroot:suffix not in inf, using default
DEBUG: backend-userroot:create_suffix_entry not in inf, using default
DEBUG: backend-userroot:sample_entries not in inf, using default
DEBUG: backend-userroot:require_index not in inf, using default
DEBUG: Configuration backends []
DEBUG: START: Starting installation...
DEBUG: READY: Preparing installation for test...
DEBUG: PASSED: using config settings 999999999
DEBUG: PASSED: user / group checking
DEBUG: PASSED: prefix checking
DEBUG: list instance not found in /etc/dirsrv/slapd-test/dse.ldif: test
DEBUG: PASSED: instance checking
DEBUG: INFO: temp root password set to kl.eC6xyHOC3qDEMEuZ4c1u3MbKDFKJAJVjbZ2T8v2mVWnujj4U5pCzKIg0smtas1
DEBUG: PASSED: root user checking
DEBUG: [Errno 97] Address family not supported by protocol
Traceback (most recent call last):
File "/usr/sbin/dscreate", line 75, in <module>
result = args.func(inst, log, args)
File "/usr/lib/python3.6/site-packages/lib389/cli_ctl/instance.py", line 71, in instance_create
if sd.create_from_inf(args.file):
File "/usr/lib/python3.6/site-packages/lib389/instance/setup.py", line 527, in create_from_inf
self.create_from_args(general, slapd, backends, self.extra)
File "/usr/lib/python3.6/site-packages/lib389/instance/setup.py", line 643, in create_from_args
self._prepare_ds(general, slapd, backends)
File "/usr/lib/python3.6/site-packages/lib389/instance/setup.py", line 611, in _prepare_ds
assert_c(socket_check_open('::1', slapd['port']) is False, "port %s is already in use, or missing NET_BIND_SERVICE" % slapd['port'])
File "/usr/lib/python3.6/site-packages/lib389/utils.py", line 1131, in socket_check_open
with closing(socket.socket(socket.AF_INET6, socket.SOCK_STREAM)) as sock:
File "/usr/lib64/python3.6/socket.py", line 144, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
ERROR: Error: [Errno 97] Address family not supported by protocol
[root@rhds ~]#
[root@rhds ~]#
[root@rhds ~]#
[root@rhds ~]#
[root@rhds ~]#
[root@rhds ~]#
[root@rhds ~]#
[root@rhds ~]# dscreate from-file test.inf
Starting installation...
Error: [Errno 97] Address family not supported by protocol
[root@rhds ~]#
++++++++++++
~Hemant_Khot
From the Python lib389 code in instance/setup.py and utils.py, _prepare_ds() and socket_check_open,() require the use of IPv6 for a test, so it looks like IPv6 must be enabled for the installed to work properly.
As a bad workaround, may be try to modify the file
/usr/lib/python3.6/site-packages/lib389/utils.py
from
def socket_check_open(host, port):
with closing(socket.socket(socket.AF_INET6, socket.SOCK_STREAM)) as sock:
to
def socket_check_open(host, port):
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
but there may be other failures.
I do not see a clear IPv6 requirement in the RHDS docs, so this is likely not a tested scenario.
IPv6 is required in RHEL IdM.
If there is no IPv6 requirement, this would be a bug, and in various places, otherwise, what is the reason IPv6 needs to be disabled? Can IPv6 be enabled?
There is no requirement for IPv6 in RHDS, so this is a bug that needs to be fixed. Investigating now... I could reproduce the problem, and I verified a fix: https://pagure.io/389-ds-base/issue/51064 Fixed upstream Build tested: 389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64 # grep -i ipv6 /etc/default/grub GRUB_CMDLINE_LINUX="console=ttyS0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto ipv6.disable=1" # grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... done # grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg Generating grub configuration file ... done # reboot # dscreate -v from-file test.inf ... ... DEBUG: FINISH: Completed installation for localhost Marking as VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (389-ds:1.4 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:4695 |