Make cgroups preexisting hard dependency

This commit is contained in:
Disassembler 2018-09-14 10:41:00 +02:00
parent ab82ed3fac
commit b8bb87390f
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
26 changed files with 22 additions and 55 deletions

View File

@ -2,10 +2,6 @@
description="ActiveMQ container"
depend() {
need cgroups
}
start() {
/usr/bin/lxc-start activemq
}

View File

@ -189,12 +189,15 @@ class VMMgr:
return deps
def get_app_deps(self, app):
# Get "needs" line from init script and split it to list, skipping first two elements (docker, net)
# Get "needs" line from init script and split it to list
try:
with open(os.path.join('/etc/init.d', app), 'r') as f:
return [l.split()[2:] for l in f.readlines() if l.startswith('\tneed')][0]
for line in f.readlines():
if line.strip().startswith('need'):
return line.split()[1:]
except:
return []
pass
return []
def enable_autostart(self, app):
# Add the app to OpenRC default runlevel

View File

@ -2,10 +2,6 @@
description="CKAN DataPusher container"
depend() {
need cgroups
}
start() {
lxc-start ckan-datapusher
}

View File

@ -3,7 +3,7 @@
description="CKAN container"
depend() {
need cgroups ckan-datapusher postgres redis solr
need ckan-datapusher postgres redis solr
}
start() {

View File

@ -3,7 +3,7 @@
description="Crisis Cleanup container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="CTS container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -2,10 +2,6 @@
description="FrontlineSMS container"
depend() {
need cgroups
}
start() {
lxc-start frontlinesms
}

View File

@ -3,7 +3,7 @@
description="GNU Health container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="KanBoard container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -2,10 +2,6 @@
description="MariaDB container"
depend() {
need cgroups
}
start() {
/usr/bin/lxc-start mariadb
}

View File

@ -3,7 +3,7 @@
description="Mifos X container"
depend() {
need cgroups mariadb
need mariadb
}
start() {

View File

@ -3,7 +3,7 @@
description="Motech container"
depend() {
need cgroups activemq postgres
need activemq postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="OpenDataKit Build container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="OpenDataKit Aggregate container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -2,10 +2,6 @@
description="OpenMapKit container"
depend() {
need cgroups
}
start() {
lxc-start openmapkit
}

View File

@ -3,7 +3,7 @@
description="Pan.do/ra container"
depend() {
need cgroups postgres rabbitmq
need postgres rabbitmq
}
start() {

View File

@ -2,10 +2,6 @@
description="Postgres container"
depend() {
need cgroups
}
start() {
lxc-start postgres
}

View File

@ -2,10 +2,6 @@
description="RabbitMQ container"
depend() {
need cgroups
}
start() {
lxc-start rabbitmq
}

View File

@ -2,10 +2,6 @@
description="Redis container"
depend() {
need cgroups
}
start() {
lxc-start redis
}

View File

@ -3,7 +3,7 @@
description="Sahana Eden Demo container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="Sahana Eden container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="SAMBRO container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="SeedDMS container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -3,7 +3,7 @@
description="Sigmah container"
depend() {
need cgroups postgres
need postgres
}
start() {

View File

@ -2,10 +2,6 @@
description="Solr container"
depend() {
need cgroups
}
start() {
lxc-start solr
}

View File

@ -3,7 +3,7 @@
description="Ushahidi container"
depend() {
need cgroups mariadb
need mariadb
}
start() {