GitLab maintenance scheduled for Tomorrow, 2019-03-26, from 12:00 to 13:00 CDT - Services will be unavailable during this time.

Commit 8c547615 authored by Swann Perarnau's avatar Swann Perarnau

[feature] add a dummy container runtime

Add a container runtime that doesn't create containers, but can still
launch commands.

That should make it possible, once we figure out how to change it in the
configuration, to actually run the NRM without a setuid binary.
parent c8ca4fa5
Pipeline #5092 failed with stages
in 4 minutes and 31 seconds
......@@ -233,3 +233,25 @@ class NodeOSRuntime(ContainerRuntime):
def delete(self, container_uuid, kill=False):
"""Delete the container."""
self.client.delete(container_uuid, kill)
class DummyRuntime(ContainerRuntime):
"""Implements a dummy runtime that doesn't create any container, but still
launches commands."""
def __init__(self):
pass
def create(self, container):
pass
def execute(self, container_uuid, args, environ):
import tornado.process as process
return process.Subprocess(args, stdin=process.Subprocess.STREAM,
stdout=process.Subprocess.STREAM,
stderr=process.Subprocess.STREAM,
env=environ)
def delete(self, container_uuid, kill=False):
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment