Files
zuul/playbooks/zuul-nox/pre.yaml
James E. Blair 3ee8a4f082 Use eatmydata with zookeeper in tests
This uses eatmydata with zookeeper when we run our tests.  This
should allow us to avoid using a tmpfs (which uses memory) for
ZK, which generally shouldn't need to read back any data in our
unit tests, so we don't really care how long background writes
take.  This should save 3/4 of a GB of ram.

Change-Id: I64ef1e9028d836c91d1c7c59909ac1f5a54db2a5
2025-04-02 10:15:51 -07:00

30 lines
737 B
YAML

- hosts: all
name: Prepare node for Zuul tests
roles:
- configure-swap
- ensure-dstat-graph
- run-dstat
- role: ensure-zookeeper
zookeeper_use_tls: true
zookeeper_use_tmpfs: false
- hosts: all
name: Use eatmydata with ZooKeeper
tasks:
- name: Install eatmydata
package:
name: eatmydata
state: present
become: true
- name: Ensure Zookeeper is not running
command: pkill -f zookeeper
register: _pkill
# 0 is killed
# 1 is no process matched
# >1 is some sort of actual error
failed_when: _pkill.rc > 1
become: true
- name: Start Zookeeper
command: eatmydata /opt/zookeeper/bin/zkServer.sh start
become: true