Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions python/lib/cloudutils/serviceConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ def __init__(self, syscfg):
self.serviceName = "Apparmor"

def config(self):
return True
Comment thread
weizhouapache marked this conversation as resolved.
Comment thread
weizhouapache marked this conversation as resolved.

try:
cmd = bash("service apparmor status")
if not cmd.isSuccess() or cmd.getStdout() == "":
Expand All @@ -545,6 +547,8 @@ def config(self):
or you can manually disable it before starting myCloud")

def restore(self):
return True

try:
self.syscfg.svo.enableService("apparmor")
self.syscfg.svo.startService("apparmor")
Expand All @@ -559,6 +563,8 @@ def __init__(self, syscfg):
self.serviceName = "SElinux"

def config(self):
return True
Comment thread
weizhouapache marked this conversation as resolved.
Comment thread
weizhouapache marked this conversation as resolved.

selinuxEnabled = True

if not bash("selinuxenabled").isSuccess():
Expand All @@ -577,6 +583,8 @@ def config(self):
return True

def restore(self):
return True

try:
bash("setenforce 1")
return True
Expand Down Expand Up @@ -652,7 +660,7 @@ def config(self):
filename = "/etc/libvirt/qemu.conf"

cfo = configFileOps(filename, self)
cfo.addEntry("security_driver", "\"none\"")
cfo.addEntry("security_driver", "\"selinux\"")
cfo.addEntry("user", "\"root\"")
cfo.addEntry("group", "\"root\"")
cfo.addEntry("vnc_listen", "\"0.0.0.0\"")
Expand Down Expand Up @@ -690,7 +698,7 @@ def config(self):

filename = "/etc/libvirt/qemu.conf"
cfo = configFileOps(filename, self)
cfo.addEntry("security_driver", "\"none\"")
cfo.addEntry("security_driver", "\"apparmor\"")
cfo.addEntry("user", "\"root\"")
cfo.addEntry("group", "\"root\"")
cfo.addEntry("vnc_listen", "\"0.0.0.0\"")
Expand Down Expand Up @@ -745,7 +753,7 @@ def config(self):
filename = "/etc/libvirt/qemu.conf"

cfo = configFileOps(filename, self)
cfo.addEntry("security_driver", "\"none\"")
cfo.addEntry("security_driver", "\"apparmor\"")
cfo.addEntry("user", "\"root\"")
cfo.addEntry("group", "\"root\"")
configure_libvirt_tls(self.syscfg.env.secure, cfo)
Expand Down
228 changes: 0 additions & 228 deletions scripts/vm/hypervisor/kvm/setup_agent.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,6 @@ private HostVO waitForHostConnect(long dcId, long podId, long clusterId, String

@Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
// _setupAgentPath = Script.findScript(getPatchPath(),
// "setup_agent.sh");
_kvmPrivateNic = _configDao.getValue(Config.KvmPrivateNetwork.key());
if (_kvmPrivateNic == null) {
_kvmPrivateNic = "cloudbr0";
Expand Down
Loading