GitLab maintenance scheduled for Today, 2019-12-05, from 17:00 to 18:00 CT - Services will be unavailable during this time.

Commit c7bdd5b2 authored by Swann Perarnau's avatar Swann Perarnau

[refactor] more sensible prefix order

Some of these commands prefix were in a bit of a weird order. In
particular, it makes sense to have perfwrapper at the end.
parent 9652c95d
......@@ -61,12 +61,6 @@ class ContainerManager(object):
logger.error("Manifest is invalid")
return None
if manifest.is_feature_enabled('scheduler'):
sched = manifest.app.isolators.scheduler
argv = self.chrt.getwrappedcmd(sched)
else:
argv = []
# Check if container exists else create it
if container_name in self.containers:
container = self.containers[container_name]
......@@ -135,12 +129,11 @@ class ContainerManager(object):
else:
environ['NRM_DAMPER'] = pp.damper
# It would've been better if argo-perf-wrapper wrapped around
# argo-nodeos-config and not the final command -- that way it would
# be running outside of the container. However, because
# argo-nodeos-config is suid root, perf can't monitor it.
if manifest.is_feature_enabled('perfwrapper'):
argv.append(self.perfwrapper)
# build prefix to the entire command based on enabled features
argv = []
if manifest.is_feature_enabled('scheduler'):
sched = manifest.app.isolators.scheduler
argv = self.chrt.getwrappedcmd(sched)
# Use hwloc-bind to launch each process in the conatiner by prepending
# it as an argument to the command line, if enabled in manifest.
......@@ -153,6 +146,13 @@ class ContainerManager(object):
argv.append('--membind')
argv.append('numa:'+str(hwbindings['distrib'][bind_index].mems[0]))
# It would've been better if argo-perf-wrapper wrapped around
# argo-nodeos-config and not the final command -- that way it would
# be running outside of the container. However, because
# argo-nodeos-config is suid root, perf can't monitor it.
if manifest.is_feature_enabled('perfwrapper'):
argv.append(self.perfwrapper)
argv.append(command)
argv.extend(args)
......
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