Create 8GB file on subnodes

In CI we have /root/swapfile of 8GB on every node mounted as swap,
and it's critical for TripleO deployments which fails without it
because of memory lack.
Create such file on every subnode.

Change-Id: Id2e6237c603320eefb7a76512dbb544263614c71
This commit is contained in:
Sagi Shnaidman 2017-12-13 13:42:23 +02:00
parent 9449198547
commit 936bfff9d6
2 changed files with 10 additions and 0 deletions

View File

@ -8,3 +8,4 @@ repos:
- https://git.openstack.org/openstack-dev/devstack
- https://git.openstack.org/openstack-infra/devstack-gate
zuul_changes: "{{ lookup('env', 'ZUUL_CHANGES') }}"
subnode_swap_size: 8388608 # 8GB

View File

@ -2,6 +2,15 @@
- include: etc-nodepool.yml
become: true
- name: Create and enable swap on subnode
shell: >
dd if=/dev/zero of=/root/swapfile bs=1024 count={{ subnode_swap_size }};
chmod 600 /root/swapfile;
mkswap /root/swapfile;
swapon /root/swapfile;
echo "/root/swapfile swap swap defaults 0 0" >> /etc/fstab;
become: true
- name: Create /etc/ci directory
file:
path: /etc/ci