mirror of https://github.com/apache/cloudstack.git
remove cgroup on ubuntu, as sometimes it hang reboot
This commit is contained in:
parent
ba6af493cb
commit
9528b4de4f
|
|
@ -37,15 +37,6 @@ start() {
|
|||
log_end_msg 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Workaround for ubuntu bug:577264, make sure cgconfig/cgred start before libvirt
|
||||
service libvirt-bin stop
|
||||
service cgred stop
|
||||
service cgconfig stop
|
||||
service cgconfig start
|
||||
service cgred start
|
||||
service libvirt-bin start
|
||||
|
||||
|
||||
if start-stop-daemon --start --quiet \
|
||||
--pidfile "$PIDFILE" \
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ Provides: vmops-agent
|
|||
Conflicts: vmops-agent
|
||||
Replaces: vmops-agent
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), python, cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-agent-scripts (= ${source:Version}), libcommons-httpclient-java, libcommons-collections-java, libcommons-dbcp-java, libcommons-pool-java, libcommons-logging-java, libvirt0, cloud-daemonize, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, cgroup-bin, augeas-tools, uuid-runtime, rsync, grep, iproute, jnetpcap, ebtables, vlan
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), python, cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-agent-scripts (= ${source:Version}), libcommons-httpclient-java, libcommons-collections-java, libcommons-dbcp-java, libcommons-pool-java, libcommons-logging-java, libvirt0, cloud-daemonize, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, jnetpcap, ebtables, vlan
|
||||
Description: Cloud.com agent
|
||||
The Cloud.com agent is in charge of managing shared computing resources in
|
||||
a Cloud.com Cloud Stack-powered cloud. Install this package if this computer
|
||||
|
|
|
|||
|
|
@ -131,6 +131,27 @@ class configFileOps:
|
|||
file(self.fileName, "w").write(repl)
|
||||
if addToBackup:
|
||||
self.backups.append([src, dst])
|
||||
|
||||
def append_lines(self, match_lines, append_lines):
|
||||
fp = file(self.fileName).read(-1)
|
||||
sh = re.escape(match_lines)
|
||||
match = re.search(sh, fp, re.MULTILINE)
|
||||
if match is None:
|
||||
return
|
||||
|
||||
sh = re.escape(append_lines)
|
||||
if re.search(sh, fp, re.MULTILINE) is not None:
|
||||
return
|
||||
|
||||
newlines = []
|
||||
for line in file(self.fileName).readlines():
|
||||
if re.search(match_lines, line) is not None:
|
||||
newlines.append(line + append_lines)
|
||||
self.backups.append([line, line + append_lines])
|
||||
else:
|
||||
newlines.append(line)
|
||||
|
||||
file(self.fileName, "w").writelines(newlines)
|
||||
|
||||
def backup(self):
|
||||
for oldLine, newLine in self.backups:
|
||||
|
|
|
|||
|
|
@ -431,15 +431,9 @@ class libvirtConfigUbuntu(serviceCfgBase):
|
|||
|
||||
def config(self):
|
||||
try:
|
||||
cfgline = "export CGROUP_DAEMON='cpu:/virt'"
|
||||
libvirtfile = "/etc/default/libvirt-bin"
|
||||
cfo = configFileOps(libvirtfile, self)
|
||||
cfo.add_lines(cfgline)
|
||||
|
||||
self.setupLiveMigration()
|
||||
|
||||
cfgline = "cgroup_controllers = [ \"cpu\" ]\n" \
|
||||
"security_driver = \"none\"\n"
|
||||
cfgline = "security_driver = \"none\"\n"
|
||||
filename = "/etc/libvirt/qemu.conf"
|
||||
|
||||
cfo = configFileOps(filename, self)
|
||||
|
|
|
|||
|
|
@ -91,8 +91,7 @@ class sysConfigAgentUbuntu(sysConfigAgent):
|
|||
super(sysConfigAgentUbuntu, self).__init__(glbEnv)
|
||||
self.svo = serviceOpsUbuntu()
|
||||
|
||||
self.services = [cgroupConfig(self),
|
||||
securityPolicyConfigUbuntu(self),
|
||||
self.services = [securityPolicyConfigUbuntu(self),
|
||||
networkConfigUbuntu(self),
|
||||
libvirtConfigUbuntu(self),
|
||||
firewallConfigUbuntu(self),
|
||||
|
|
|
|||
Loading…
Reference in New Issue