valet-linux icon indicating copy to clipboard operation
valet-linux copied to clipboard

Bug: RedHat/Fedora based systems long boot time. Systemd valet-dns.service network wait online issue.

Open mc0de opened this issue 2 years ago • 4 comments

Basic info

Distro (Name and version) PHP Version Valet version
Ex: Fedora 38 8.2.10 2.3.5

What is the problem?

On Fedora systems dns-valet.service waits until network is onlina via /usr/lib/systemd/systemd-networkd-wait-online

dns-valet.service

Wants=network-online.target systemd-networkd-wait-online.service

This results into long system boot times because /usr/lib/systemd/systemd-networkd-wait-online is not responding properly and I guess is somewhat deprecated on Fedora. For network online presence Fedora uses NetworkManager-wait-online.service by accordingly calling ExecStart=/usr/bin/nm-online -s -q which is already a part of network-online.target.

Second systemd-networkd-wait-online.service parameter should be removed for Fedora systems.

Solution For Fedora systems systemd valet-dns.service should be updated to:

Wants=network-online.target

mc0de avatar Sep 13 '23 12:09 mc0de

Also set Selinux to disable or permissive to prevent DNSMasq to fail on boot and break network connection

sudo nano /etc/selinux/config

SELINUX=disabled

SirRickster avatar Oct 19 '23 11:10 SirRickster

There is no need to have it loaded on the kernel if you set it disabled. I'd rather not load SELinux at all.

sudo grubby --update-kernel ALL --args selinux=0

mc0de avatar Oct 19 '23 11:10 mc0de

Thank you very much @mc0de I had the same issue on my Fedora 39 laptop and your config fixed it 😀

romainprevost avatar Mar 01 '24 13:03 romainprevost

facing the same with Fedora 40, may I understand how to solve the long boot time issue ? already did the fixes for SELinux using grubby and config edit

anasgets111 avatar Jul 27 '24 10:07 anasgets111