For backwards-compatibility the SON_EMU_CMD/VIM_EMU_CMD commands still
surpress this, but otherwise the usual ENTRYPOINT + CMD logic should be
working with this + commit
83b52502743eb29e5e0b8e33e6aa119a5005c676 in
containernet.
Since the caching of the build server prevents a automatic Containernet
update to latest master, an explicit commit hash is given. This will
allow explicit updates when required while still supporting caching.
Comment wording above checkout is from Manuel Peuster.
Change-Id: Ic01f87acb5f9e79d09baae499f3d353c2c0aca9e
Signed-off-by: schillinge <ablu@mail.uni-paderborn.de>
sudo
# install containernet (using its Ansible playbook)
-RUN git clone https://github.com/containernet/containernet.git
+# Attention: Containernet installation fixed to specific commit. Change to update to latest Containernet version.
+RUN git clone https://github.com/containernet/containernet.git && \
+ (cd containernet && git checkout bc269d6f1cf9f50f71fda65c25fe1f2f4c1573b7)
WORKDIR /containernet/ansible
RUN ansible-playbook -i "localhost," -c local --skip-tags "notindocker" install.yml
# Start the real emulator command now as specified in the dockerfile
config = c.dcinfo.get("Config", dict())
env = config.get("Env", list())
+ legacy_command_execution = False
for env_var in env:
var, cmd = map(str.strip, map(str, env_var.split('=', 1)))
if var == "SON_EMU_CMD" or var == "VIM_EMU_CMD":
t = threading.Thread(target=c.cmdPrint, args=(cmd,))
t.daemon = True
t.start()
+ legacy_command_execution = True
break # only execute one command
+ if not legacy_command_execution:
+ c.start()
def stop_compute(self, server):
"""
try:
config = c.dcinfo.get("Config", dict())
env = config.get("Env", list())
+ legacy_command_execution = False
for env_var in env:
var, cmd = map(str.strip, map(str, env_var.split('=', 1)))
logging.debug("%r = %r" % (var, cmd))
t = threading.Thread(target=c.cmdPrint, args=(cmd,))
t.daemon = True
t.start()
+ legacy_command_execution = True
+ break
+ if not legacy_command_execution:
+ c.start()
except Exception as ex:
logging.warning("Couldn't run Docker entry point VIM_EMU_CMD")
logging.exception("Exception:")