aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-11-12 07:48:57 +0000
committerPeter Mikus <pmikus@cisco.com>2019-11-12 08:13:42 +0000
commita6721ae4168680431604e7e9426c311613287ce8 (patch)
tree175229a3d3a937c34b09ae184f45db8d3abc9cb3 /resources/libraries
parenta31a47b1b497efffbcbb92004d32885a84f4ff4f (diff)
FIX: Supervisor initialization
- Next step: remove supervisor entirely Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I7ff5d76168d5d0f77e335975552638efac77cfc8
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/ContainerUtils.py43
1 files changed, 21 insertions, 22 deletions
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py
index 50868cb8f2..61409ff908 100644
--- a/resources/libraries/python/ContainerUtils.py
+++ b/resources/libraries/python/ContainerUtils.py
@@ -27,7 +27,7 @@ from resources.libraries.python.VppConfigGenerator import VppConfigGenerator
__all__ = ["ContainerManager", "ContainerEngine", "LXC", "Docker", "Container"]
-SUPERVISOR_CONF = '/etc/supervisord.conf'
+SUPERVISOR_CONF = '/etc/supervisor/supervisord.conf'
class ContainerManager(object):
@@ -397,29 +397,29 @@ class ContainerEngine(object):
if isinstance(self, LXC):
self.execute('sleep 3; apt-get update')
self.execute('apt-get install -y supervisor')
- self.execute('echo "{config}" > {config_file} && '
- 'unlink /tmp/supervisor.sock && '
- 'supervisord -c {config_file}'.
- format(
- config='[unix_http_server]\n'
- 'file = /tmp/supervisor.sock\n\n'
- '[rpcinterface:supervisor]\n'
- 'supervisor.rpcinterface_factory = '
- 'supervisor.rpcinterface:make_main_rpcinterface\n\n'
- '[supervisorctl]\n'
- 'serverurl = unix:///tmp/supervisor.sock\n\n'
- '[supervisord]\n'
- 'pidfile = /tmp/supervisord.pid\n'
- 'identifier = supervisor\n'
- 'directory = /tmp\n'
- 'logfile = /tmp/supervisord.log\n'
- 'loglevel = debug\n'
- 'nodaemon = false\n\n',
- config_file=SUPERVISOR_CONF))
+ self.execute('echo "{config}" > {config_file} && '
+ 'supervisord -c {config_file}'.
+ format(
+ config='[unix_http_server]\n'
+ 'file = /tmp/supervisor.sock\n\n'
+ '[rpcinterface:supervisor]\n'
+ 'supervisor.rpcinterface_factory = supervisor.'
+ 'rpcinterface:make_main_rpcinterface\n\n'
+ '[supervisorctl]\n'
+ 'serverurl = unix:///tmp/supervisor.sock\n\n'
+ '[supervisord]\n'
+ 'pidfile = /tmp/supervisord.pid\n'
+ 'identifier = supervisor\n'
+ 'directory = /tmp\n'
+ 'logfile = /tmp/supervisord.log\n'
+ 'loglevel = debug\n'
+ 'nodaemon = false\n\n',
+ config_file=SUPERVISOR_CONF))
def start_vpp(self):
"""Start VPP inside a container."""
- self.execute('echo "{config}" >> {config_file}'.
+ self.execute('echo "{config}" >> {config_file} && '
+ 'supervisorctl reload'.
format(
config='[program:vpp]\n'
'command = /usr/bin/vpp -c /etc/vpp/startup.conf\n'
@@ -428,7 +428,6 @@ class ContainerEngine(object):
'redirect_stderr = true\n'
'priority = 1',
config_file=SUPERVISOR_CONF))
- self.execute('supervisorctl reload')
self.execute('supervisorctl start vpp')
from robot.libraries.BuiltIn import BuiltIn