Browse Source

Run devstack zookeeper on tmpfs

We've seen connection losses to zookeeper during functional testing on
some cloud regions. Move zookeepers data dir to tmpfs to avoid io to the
disk costs.

Change-Id: If45d5cd7a2b63dbe7f20e7ef528b65ba41af7117
tags/3.4.0
Clark Boylan 6 months ago
parent
commit
0d17a2527d
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      devstack/plugin.sh

+ 11
- 0
devstack/plugin.sh View File

@@ -651,6 +651,14 @@ EOF
651 651
     mkdir -p $HOME/.cache/openstack/
652 652
 }
653 653
 
654
+function nodepool_zk_on_tmpfs {
655
+    local datadir
656
+    datadir=$(sed -n -e 's/^dataDir=//p' /etc/zookeeper/conf/zoo.cfg)
657
+    sudo service zookeeper stop
658
+    sudo mount -t tmpfs -o nodev,nosuid,size=500M none $datadir
659
+    sudo service zookeeper start
660
+}
661
+
654 662
 # Create configs
655 663
 # Setup custom flavor
656 664
 function configure_nodepool {
@@ -694,6 +702,9 @@ function start_nodepool {
694 702
     export STATSD_PORT=8125
695 703
     run_process statsd "/usr/bin/socat -u udp-recv:$STATSD_PORT -"
696 704
 
705
+    # Restart nodepool's zk on a tmpfs
706
+    nodepool_zk_on_tmpfs
707
+
697 708
     # Ensure our configuration is valid.
698 709
     $NODEPOOL_INSTALL/bin/nodepool -c $NODEPOOL_CONFIG config-validate
699 710
 

Loading…
Cancel
Save