Quote:
Originally Posted by jpollard
That by itself would not work... without NetworkManager (or networks) you don't have a network being initialized.
enabling networks in addition would allow it to work.
|
This thread and this final post, although old, were helpful to me this week.
After a yum update all, I had centos-release-7-4.1708.el7.centos.x86_64 and kernel-3.10.0-693.2.2.el7.x86_64.
Network.services failed to load during boot: "Failed to start LSB: Bring up/down networking."
The reason for that failure was that "Determining IP information for eth0... failed."
And the reason that IP information for eth0 failed was that something mangled the addresses for my server, gateway, and DNS servers in
/etc/sysconfig/network-scripts/ifcfg-eth0. The definition of BOOTPROTO was changed from "static" to "dhcp", and all of the IP addresses were stripped out of
ifcfg-eth0.
In my case, I chose to work with NetworkManager rather than network.services (or a combination of both).
I disabled cloud-init, which kept rewriting
/etc/sysconfig/network-scripts/ifcfg-eth0 on each boot by creating
/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with this single line in it:
network: {config: disabled}
Because I turned off network.services, I set "NM_CONTROLLED=yes" for both
ifcfg-eth0 and
ifcfg-eth1.
The Apache daemon still failed to start. It seemed to be a timing issue during the boot process. I created
/etc/NetworkManager/dispatcher.d/22-httpd as shown below. The system calls it when NetworkManager thinks it is open for business.
Code:
#!/bin/sh
# This is a NetworkManager dispatcher script to turn http on
# when the network is ready. MXM
# /etc/NetworkManager/dispatcher.d/22-httpd
# https://wiki.archlinux.org/index.php/NetworkManager#Network_services_with_NetworkManager_dispatcher
if [ "$2" = "up" ]; then
systemctl start httpd
fi
if [ "$2" = "down" ]; then
systemctl stop httpd
fi
exit 0