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" description="ActiveMQ container"
depend() {
need cgroups
}
start() { start() {
/usr/bin/lxc-start activemq /usr/bin/lxc-start activemq
} }

View File

@ -189,11 +189,14 @@ class VMMgr:
return deps return deps
def get_app_deps(self, app): 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: try:
with open(os.path.join('/etc/init.d', app), 'r') as f: 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: except:
pass
return [] return []
def enable_autostart(self, app): def enable_autostart(self, app):

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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