Merge "Enable overcommit_memory in test server VMs"

This commit is contained in:
Zuul 2019-08-16 19:26:24 +00:00 committed by Gerrit Code Review
commit 7140479919
1 changed files with 11 additions and 0 deletions

View File

@ -806,6 +806,17 @@ class LoadBalancerBaseTestWithCompute(LoadBalancerBaseTest):
if proc.returncode != 0: if proc.returncode != 0:
raise exceptions.CommandFailed(proc.returncode, cmd, raise exceptions.CommandFailed(proc.returncode, cmd,
stdout, stderr) stdout, stderr)
# Enabling memory overcommit allows to run golang static binaries
# compiled with a recent golang toolchain (>=1.11). Those binaries
# allocate a large amount of virtual memory at init time, and this
# allocation fails in tempest's nano flavor (64MB of RAM)
# (golang issue reported in https://github.com/golang/go/issues/28114,
# follow-up: https://github.com/golang/go/issues/28081)
# TODO(gthiemonge): Remove this call when golang issue is resolved.
linux_client.exec_command('sudo sh -c "echo 1 > '
'/proc/sys/vm/overcommit_memory"')
linux_client.exec_command('sudo screen -d -m {0} -port 80 ' linux_client.exec_command('sudo screen -d -m {0} -port 80 '
'-id {1}'.format(dest_file, start_id)) '-id {1}'.format(dest_file, start_id))
linux_client.exec_command('sudo screen -d -m {0} -port 81 ' linux_client.exec_command('sudo screen -d -m {0} -port 81 '