Commit 3fcf2f50 authored by Kamil Iskra's avatar Kamil Iskra Committed by Swann Perarnau

Pass environment explicitly

When invoking 'argo_nodeos_config run', we were passing the job
environment implicitly.  This wasn't very clean and was also causing
problems with variables such as LD_PRELOAD, which were being filtered
out because argo_nodeos_config is suid root.
parent 3a52922c
Pipeline #3750 passed with stages
in 20 seconds
...@@ -114,11 +114,13 @@ class NodeOSClient(object): ...@@ -114,11 +114,13 @@ class NodeOSClient(object):
# to escape spaces from arguments before. # to escape spaces from arguments before.
argv = [s.replace(' ', r'\ ') for s in argv] argv = [s.replace(' ', r'\ ') for s in argv]
cmd += " argv:'"+" ".join(argv)+"'" cmd += " argv:'"+" ".join(argv)+"'"
env = ['{0}={1}'.format(envname, envval.replace(' ', r'\ '))
for envname, envval in environ.items()]
cmd += " env:'"+" ".join(env)+"'"
args.append(cmd) args.append(cmd)
return process.Subprocess(args, stdin=process.Subprocess.STREAM, return process.Subprocess(args, stdin=process.Subprocess.STREAM,
stdout=process.Subprocess.STREAM, stdout=process.Subprocess.STREAM,
stderr=process.Subprocess.STREAM, stderr=process.Subprocess.STREAM)
class ChrtClient(object): class ChrtClient(object):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment