Commit 90157c2a authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[fix] Use proper env variable for container uuid

This patch fixes the daemon code to include the container uuid in the
environment of the command, while changing that environment variable to
use a better suited name.
parent 7786fb66
...@@ -108,7 +108,7 @@ class DownstreamApplication(object): ...@@ -108,7 +108,7 @@ class DownstreamApplication(object):
self.progress.start() self.progress.start()
# retrieve our container uuid # retrieve our container uuid
self.container_uuid = os.environ.get('container') self.container_uuid = os.environ.get('ARGO_CONTAINER_UUID')
if self.container_uuid is None: if self.container_uuid is None:
logger.error("missing container uuid") logger.error("missing container uuid")
exit(1) exit(1)
...@@ -49,11 +49,11 @@ class ContainerManager(object): ...@@ -49,11 +49,11 @@ class ContainerManager(object):
"/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") "/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
environ['AC_APP_NAME'] = environ['AC_APP_NAME'] =
environ['AC_METADATA_URL'] = "localhost" environ['AC_METADATA_URL'] = "localhost"
environ['container'] = 'argo'"run: environ: %r", environ)"run: environ: %r", environ)
# create container # create container
container_name = request['uuid'] container_name = request['uuid']
environ['ARGO_CONTAINER_UUID'] = container_name"creating container %s", container_name)"creating container %s", container_name)
self.nodeos.create(container_name, allocation) self.nodeos.create(container_name, allocation)"created container %s", container_name)"created container %s", container_name)
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