shwstppr commented on a change in pull request #4068:
URL: https://github.com/apache/cloudstack/pull/4068#discussion_r438703254
##########
File path: python/lib/cloudutils/serviceConfig.py
##########
@@ -343,7 +349,7 @@ def config(self):
cfo.addEntry("NOZEROCONF", "yes")
cfo.save()
- if not bash("service network restart").isSuccess():
+ if not bash("systemctl restart
NetworkManager.service").isSuccess():
Review comment:
@rhtyd `systemctl restart network` doesn't works on CentOS 8,
```
[root@srvr1 ~]# hostnamectl
Static hostname: localhost.localdomain
Transient hostname: srvr1.cloud.priv
Icon name: computer-vm
Chassis: vm
Machine ID: 5319303eb7f24b7b9ff80b20b150cc0c
Boot ID: 520c83f640bc4635880b23ba6f765497
Virtualization: kvm
Operating System: CentOS Linux 8 (Core)
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-147.8.1.el8_1.x86_64
Architecture: x86-64
[root@srvr1 ~]# systemctl restart network
Failed to restart network.service: Unit network.service not found.
[root@srvr1 ~]# systemctl restart NetworkManager
[root@srvr1 ~]# exit
```
This code to add bridge is not really used as we create bridge prior to
installation as per docs. However, I've modified the above change to allow
backward compatibility
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]