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

[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):
def create(self, container):
def execute(self, container_uuid, args, environ):
import tornado.process as process
return process.Subprocess(args, stdin=process.Subprocess.STREAM,
def delete(self, container_uuid, kill=False):
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