You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/09/04 07:28:22 UTC
[cloudstack] branch master updated: Ubuntu 20.04: restart libvirtd
instead of libvirt-bin (#4301)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new f38db8a Ubuntu 20.04: restart libvirtd instead of libvirt-bin (#4301)
f38db8a is described below
commit f38db8ae65c42559c2acda31fbb5be6349703b8b
Author: Wei Zhou <w....@global.leaseweb.com>
AuthorDate: Fri Sep 4 09:27:58 2020 +0200
Ubuntu 20.04: restart libvirtd instead of libvirt-bin (#4301)
---
python/lib/cloudutils/serviceConfig.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/python/lib/cloudutils/serviceConfig.py b/python/lib/cloudutils/serviceConfig.py
index 37fa5a9..0d8d591 100755
--- a/python/lib/cloudutils/serviceConfig.py
+++ b/python/lib/cloudutils/serviceConfig.py
@@ -592,8 +592,11 @@ class libvirtConfigUbuntu(serviceCfgBase):
cfo.addEntry("group", "\"root\"")
cfo.save()
- self.syscfg.svo.stopService("libvirt-bin")
- self.syscfg.svo.enableService("libvirt-bin")
+ if os.path.exists("/lib/systemd/system/libvirtd.service"):
+ bash("systemctl restart libvirtd")
+ else:
+ self.syscfg.svo.stopService("libvirt-bin")
+ self.syscfg.svo.enableService("libvirt-bin")
if os.path.exists("/lib/systemd/system/libvirt-bin.socket"):
bash("systemctl stop libvirt-bin.socket")
return True