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
This commit is contained in:
James E. Blair
2025-04-02 08:08:33 -07:00
parent 9fd5160558
commit 3ee8a4f082
+22
View File
@@ -1,7 +1,29 @@
- 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