Support EL8
Closed this issue ยท 8 comments
Expected Behavior
Network Module should successfully restart network service on RHEL 8 / Centos 8
Actual Behavior
Error: /Stage[main]/Network/Exec[service network restart]: Failed to call refresh: 'service network restart' returned 5 instead of one of [0]
Steps to Reproduce the Problem
Specifications
Please add this info:
- Output of
facter -p
on the failing node (at least the OS related facts) - Version of Puppet and of the module
- The relevant Puppet code and eventually Hiera data
Hi,
Im having the same issue and still can't explain why, but if you run a second time, it doens't complain anymore.
Regards
I noticed the following
service network status
Redirecting to /bin/systemctl status network.service
Unit network.service could not be found.
And it is explained in
https://www.golinuxcloud.com/unit-network-service-not-found-rhel-8-linux/
I see two solutions, the easy and the good one.
The easy is
yum install network-scripts
That will provide the old stuff needed to make the current version of this module works
The good one
Add new code to allow to the module manage interfaces with NetworkManager
I vote for the good one. Seems like everything works we just need to set correct service name for service_restart_exec
. Will check and probably put an PR soon.
Already did a PR, waitting feedback
Hi,
Im having the same issue and still can't explain why, but if you run a second time, it doens't complain anymore.
Regards
Hello FcoCalero,
this is because the restart of the network stack would be only triggered once if the network configuration file changes. On the second run no change happens to the network config file therefore no restart would be triggered.
Regards,
Florian
Looks like NetworkManager is the default network management service in rhel8, but I wonder how many use it on servers. Note also, that the network::service_restart_exec parameter allows customisation of the command to run to restart the service. So with the current module it's actually possible to configure the correct service restart command, whatever is the method used.