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 2021/03/11 07:38:26 UTC

[cloudstack] branch 4.15 updated: centos: Mask libvirtd sockets which prevents cloudstack-agent from being setup (#4756)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.15 by this push:
     new 14366cd  centos: Mask libvirtd sockets which prevents cloudstack-agent from being setup (#4756)
14366cd is described below

commit 14366cdd6ccbdfdce0c10b490ac94036bef7f662
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Thu Mar 11 13:08:09 2021 +0530

    centos: Mask libvirtd sockets which prevents cloudstack-agent from being setup (#4756)
    
    * Prevent adding --listen parameter when libvirt version > 5.6
    
    * mask libvirtd sockets
    
    * remove unused import
    
    Co-authored-by: Pearl Dsilva <pe...@shapeblue.com>
---
 python/lib/cloudutils/serviceConfig.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/python/lib/cloudutils/serviceConfig.py b/python/lib/cloudutils/serviceConfig.py
index 4cbab59..8294914 100755
--- a/python/lib/cloudutils/serviceConfig.py
+++ b/python/lib/cloudutils/serviceConfig.py
@@ -535,6 +535,12 @@ class libvirtConfigRedhat(serviceCfgBase):
                 cfo.addEntry("export CGROUP_DAEMON", "'cpu:/virt'")
             cfo.addEntry("LIBVIRTD_ARGS", "-l")
             cfo.save()
+            if os.path.exists("/lib/systemd/system/libvirtd.socket"):
+                bash("/bin/systemctl mask libvirtd.socket");
+                bash("/bin/systemctl mask libvirtd-ro.socket");
+                bash("/bin/systemctl mask libvirtd-admin.socket");
+                bash("/bin/systemctl mask libvirtd-tls.socket");
+                bash("/bin/systemctl mask libvirtd-tcp.socket");
 
             filename = "/etc/libvirt/qemu.conf"