Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VAT-to-PAPI: LISPSetup
[csit.git]
/
resources
/
libraries
/
python
/
ContainerUtils.py
diff --git
a/resources/libraries/python/ContainerUtils.py
b/resources/libraries/python/ContainerUtils.py
index
7d04b06
..
363411c
100644
(file)
--- a/
resources/libraries/python/ContainerUtils.py
+++ b/
resources/libraries/python/ContainerUtils.py
@@
-449,6
+449,7
@@
class ContainerEngine(object):
vpp_config.add_unix_cli_listen()
vpp_config.add_unix_nodaemon()
vpp_config.add_unix_exec('/tmp/running.exec')
vpp_config.add_unix_cli_listen()
vpp_config.add_unix_nodaemon()
vpp_config.add_unix_exec('/tmp/running.exec')
+ vpp_config.add_socksvr()
# We will pop the first core from the list to be a main core
vpp_config.add_cpu_main_core(str(cpuset_cpus.pop(0)))
# If more cores in the list, the rest will be used as workers.
# We will pop the first core from the list to be a main core
vpp_config.add_cpu_main_core(str(cpuset_cpus.pop(0)))
# If more cores in the list, the rest will be used as workers.
@@
-498,6
+499,7
@@
class ContainerEngine(object):
vpp_config.add_unix_cli_listen()
vpp_config.add_unix_nodaemon()
vpp_config.add_unix_exec('/tmp/running.exec')
vpp_config.add_unix_cli_listen()
vpp_config.add_unix_nodaemon()
vpp_config.add_unix_exec('/tmp/running.exec')
+ vpp_config.add_socksvr()
vpp_config.add_plugin('disable', 'dpdk_plugin.so')
# Apply configuration
vpp_config.add_plugin('disable', 'dpdk_plugin.so')
# Apply configuration
@@
-591,8
+593,12
@@
class LXC(ContainerEngine):
else:
return
else:
return
+ target_arch = 'arm64' \
+ if Topology.get_node_arch(self.container.node) == 'aarch64' \
+ else 'amd64'
+
image = self.container.image if self.container.image else\
image = self.container.image if self.container.image else\
- "-d ubuntu -r bionic -a
amd64"
+ "-d ubuntu -r bionic -a
{arch}".format(arch=target_arch)
cmd = 'lxc-create -t download --name {c.name} -- {image} '\
'--no-validate'.format(c=self.container, image=image)
cmd = 'lxc-create -t download --name {c.name} -- {image} '\
'--no-validate'.format(c=self.container, image=image)
@@
-784,7
+790,10
@@
class Docker(ContainerEngine):
return
if not self.container.image:
return
if not self.container.image:
- setattr(self.container, 'image', 'snergster/csit-sut:latest')
+ img = Constants.DOCKER_SUT_IMAGE_UBUNTU_ARM \
+ if Topology.get_node_arch(self.container.node) == 'aarch64' \
+ else Constants.DOCKER_SUT_IMAGE_UBUNTU
+ setattr(self.container, 'image', img)
cmd = 'docker pull {image}'.format(image=self.container.image)
cmd = 'docker pull {image}'.format(image=self.container.image)
@@
-792,6
+801,7
@@
class Docker(ContainerEngine):
if int(ret) != 0:
raise RuntimeError('Failed to create container {c.name}.'
.format(c=self.container))
if int(ret) != 0:
raise RuntimeError('Failed to create container {c.name}.'
.format(c=self.container))
+
if self.container.cpuset_cpus:
self._configure_cgroup('docker')
if self.container.cpuset_cpus:
self._configure_cgroup('docker')