Commit c95f1f2b authored by Sridutt Bhalachandra's avatar Sridutt Bhalachandra
Browse files

Modify environment to reflect powerpolicy manifest option

On enabling the powepolicy manifest option and setting the policy parameter to
any valid value (except "NONE") the application library providing contextual
information is loaded using LD_PRELOAD

See issue #10
parent a2274c7f
Pipeline #3633 failed with stages
......@@ -50,6 +50,8 @@ class ContainerManager(object):
environ['AC_APP_NAME'] =
environ['AC_METADATA_URL'] = "localhost""run: environ: %r", environ)
# TODO: Application library to load must be set during configuration
applicationpreloadlibrary = '.so'
# create container
container_name = request['uuid']
......@@ -74,6 +76,12 @@ class ContainerManager(object):
if in ["1", "True"]:
if hasattr(, 'powerpolicy'):
if hasattr(, 'enabled'):
if in ["1", "True"]:
if != "NONE":
environ['LD_PRELOAD'] = applicationpreloadlibrary
process = self.nodeos.execute(container_name, argv, environ)
Supports Markdown
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