Browse Source

Merge "Enable overcommit_memory in test server VMs"

changes/93/638293/7
Zuul 1 month ago
parent
commit
7140479919
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      octavia_tempest_plugin/tests/test_base.py

+ 11
- 0
octavia_tempest_plugin/tests/test_base.py View File

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

Loading…
Cancel
Save