Bug 1402961
Summary: | rpcbind.socket systemd unit fails to start when IPv6 is disabled. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Matthew LeSieur <matthew.lesieur> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.3 | CC: | aparsons, arogozin, guillaume.pavese, iana, jakubr, jsynacek, kcleveng, kwalker, matthew.fansher, phil, pjmead, riehecky, rmetrich, rs, systemd-maint-list, tparsons, troels |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-07-07 08:24:37 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: | 1420851 |
Description
Matthew LeSieur
2016-12-08 18:41:49 UTC
The problem is that if you disable ipv6 n sysctl.conf, it is not disabled from the beginning of the boot, but actually quite late in the boot process. Meanwhile systemd found out that ipv6 is enabled and scheduled a start of a socket, that would listen on ipv6. There are two solution to this problem. Either disable the ipv6 from kernel command line, or after you edit the sysctl.conf call dracut -f, so your change also gets into the initramfs. Your explanation lines-up with my experience. Existing RHEL installations, before the change to rpcbind.socket, worked fine since the installation of new Kernels automatically executes dracut, so the sysctl setting to disable IPv6 was already in the initramfs image when rpcbind.socket was updated. I modified our kickstart configuration to include the following lines so the sysctl setting to disable IPv6 makes it into the initramfs image on first-boot. echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/ipv6.conf #raw for kver in $(rpm --qf '%{VERSION}\-%{RELEASE}.%{ARCH}\n' -q kernel); do dracut -f --kver $kver; done #endraw I've just been bitten by this as well, after updating to 7.3. I also have had this problem at RHEL7.3 after removing IPV6 support! I added the dracut -f and seemed to fix the issue:- # Disable IPv6 cat <<EOF > /etc/sysctl.d/98-disable-ipv6.conf net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 EOF sysctl -p /etc/sysctl.d/98-disable-ipv6.conf dracut -f This is also happens on the current version of RHEL Atomic Host with: net.ipv6.conf.all.disable_ipv6 = 1 Modifying the initramfs seems troublesome with OSTree. Make sure ipv6 is disabled in sysctl.conf: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 Then: # sudo systemctl enable rpcbind.socket # sudo systemctl restart rpcbind.socket # sudo mount -a This just bit us as well. We're making those updates inside the %post section of a kickstart so had to be a bit careful about calling dracut, because we want to update the installed kernel(s), not the running one. In the end we went with something like KERNELS=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n') for kernel_version in ${KERNELS} ; do dracut -f /boot/initramfs-${kernel_version}.img ${kernel_version} done As suggested in comment 1, this is a configuration problem. I'm a bit surprised this is NOTABUG, as systemd-sysctl.service runs before sysinit.target. I'd be inclined to believe any of the network socket bits should run their interface logic after sysinit.target and systemd-modules-load.service. I found that, initially, doing the dracut and rebooting did not help. rpcbind still failed on boot. When I did "lsinitrd", I found that /etc/sysctl.conf was not in there. Since it's supposed to be the ipv6 setting in sysctl.conf that is what's supposed to fix the problem, I found this suspicious. When I added "install_items+=/etc/sysctl.conf" to /etc/dracut.conf and then did another dracut and reboot, all was well. I'm on RHEL 7.7 Hi Phil, Probably your initramfs is a "generic" initramfs, not "host-specific". Please verify that you don't have dracut-config-generic package installed, this package forces building a generic image. Renaud Métrich, You are quite right. I had dracut-config-generic installed. I uninstalled it (no dependencies needed to be removed), removed my "/etc/sysctl.conf" addition from /etc/dracut.conf, invoked dracut, and lsinitrd showed that /etc/sysctl.conf was there. I'm not sure how or why dracut-config-generic got installed. I will look into it... Thanks. Hi Phil, I updated the KCS we have (https://access.redhat.com/solutions/2798411) and linked it to this BZ. Renaud. Thanks, Renaud. I did run into that KCS when I was searching the web for a resolution to my problem. I'd like to point out that Jacob Shivers' comment that "It is not required to use the -H flag to incorporate the changes into the initramfs" had me going for a while. The comment is correct *if* you happened to notice the instruction earlier in the KCS to verify that dracut-config-generic was not installed. I had not noticed that instruction. It might have been nice if Jacob emphasized that point in his comment. (But, then again, it might be nice if I read instructions more thoroughly. :-) |