Skip to content

Commit

Permalink
[vstest]: fix redis mount point with --dvsname option (#654)
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <gulv@microsoft.com>
  • Loading branch information
lguohan authored Oct 23, 2018
1 parent 3d4bed1 commit 6e76e9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def __init__(self, name=None, keeptb=False):
server = VirtualServer(ctn_sw_name, self.ctn_sw_pid, i)
self.servers.append(server)

self.mount = "/var/run/redis-vs/"

self.restart()
else:
self.ctn_sw = self.client.containers.run('debian:jessie', privileged=True, detach=True,
Expand All @@ -192,14 +194,14 @@ def __init__(self, name=None, keeptb=False):
# mount redis to base to unique directory
self.mount = "/var/run/redis-vs/{}".format(self.ctn_sw.name)
os.system("mkdir -p {}".format(self.mount))
self.redis_sock = self.mount + '/' + "redis.sock"

# create virtual switch container
self.ctn = self.client.containers.run('docker-sonic-vs', privileged=True, detach=True,
network_mode="container:%s" % self.ctn_sw.name,
volumes={ self.mount: { 'bind': '/var/run/redis', 'mode': 'rw' } })

self.appldb = None
self.redis_sock = self.mount + '/' + "redis.sock"
try:
# temp fix: remove them once they are moved to vs start.sh
self.ctn.exec_run("sysctl -w net.ipv6.conf.default.disable_ipv6=0")
Expand Down

0 comments on commit 6e76e9b

Please sign in to comment.