summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2018-12-18 15:20:47 -0800
committerClark Boylan <clark.boylan@gmail.com>2018-12-18 15:20:47 -0800
commit0d17a2527d41ec00923b184078f49d8458f039d6 (patch)
tree6f325161a832a0c6983b4c254335aac786ea3e73
parent713de6c7118001897c21ffaf340771ea425a61b2 (diff)
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
Notes
Notes (review): Code-Review+2: Ian Wienand <iwienand@redhat.com> Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Workflow+1: Tobias Henkel <tobias.henkel@bmw.de> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 19 Dec 2018 05:46:29 +0000 Reviewed-on: https://review.openstack.org/626038 Project: openstack-infra/nodepool Branch: refs/heads/master
-rw-r--r--devstack/plugin.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index b5d15f9..8cacc8f 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -651,6 +651,14 @@ EOF
651 mkdir -p $HOME/.cache/openstack/ 651 mkdir -p $HOME/.cache/openstack/
652} 652}
653 653
654function 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# Create configs 662# Create configs
655# Setup custom flavor 663# Setup custom flavor
656function configure_nodepool { 664function configure_nodepool {
@@ -694,6 +702,9 @@ function start_nodepool {
694 export STATSD_PORT=8125 702 export STATSD_PORT=8125
695 run_process statsd "/usr/bin/socat -u udp-recv:$STATSD_PORT -" 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 # Ensure our configuration is valid. 708 # Ensure our configuration is valid.
698 $NODEPOOL_INSTALL/bin/nodepool -c $NODEPOOL_CONFIG config-validate 709 $NODEPOOL_INSTALL/bin/nodepool -c $NODEPOOL_CONFIG config-validate
699 710