From cbd64b61751bf22d2955ffb7f531a02947a97edb Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 19 Feb 2014 09:03:19 -0800 Subject: [PATCH] Add sync calls to all prepare scripts Strictly speaking, we only need sync calls at the end of the script that is directly invoked by nodepool. But just so we don't have to think about it too much, add them to all prepare scripts. Without it, clouds will happily snapshot a system without all the data written to disk! Closes-Bug: 1282136 Change-Id: Id7dcf6667d6e48eb5ae95fd42b09f0651eeb38f9 --- .../files/nodepool/scripts/cache_git_repos.py | 0 .../files/nodepool/scripts/prepare_devstack_new_kernel.sh | 3 +++ .../openstack_project/files/nodepool/scripts/prepare_node.sh | 3 +++ .../files/nodepool/scripts/prepare_node_bare.sh | 3 +++ .../files/nodepool/scripts/prepare_node_devstack.sh | 3 +++ .../files/nodepool/scripts/prepare_node_devstack_new_kernel.sh | 3 +++ .../files/nodepool/scripts/prepare_node_tripleo.sh | 3 +++ 7 files changed, 18 insertions(+) mode change 100644 => 100755 modules/openstack_project/files/nodepool/scripts/cache_git_repos.py mode change 100644 => 100755 modules/openstack_project/files/nodepool/scripts/prepare_devstack_new_kernel.sh mode change 100644 => 100755 modules/openstack_project/files/nodepool/scripts/prepare_node_devstack_new_kernel.sh diff --git a/modules/openstack_project/files/nodepool/scripts/cache_git_repos.py b/modules/openstack_project/files/nodepool/scripts/cache_git_repos.py old mode 100644 new mode 100755 diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_devstack_new_kernel.sh b/modules/openstack_project/files/nodepool/scripts/prepare_devstack_new_kernel.sh old mode 100644 new mode 100755 index 1dc1fec1e7..601723c7af --- a/modules/openstack_project/files/nodepool/scripts/prepare_devstack_new_kernel.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_devstack_new_kernel.sh @@ -25,3 +25,6 @@ if [ -f /usr/bin/apt-get ]; then fi /opt/nodepool-scripts/prepare_devstack.sh "$@" + +sync +sleep 5 diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh index 71b3c35b2a..888626a495 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh @@ -36,3 +36,6 @@ fi sudo mkdir -p /opt/git sudo -i python /opt/nodepool-scripts/cache_git_repos.py + +sync +sleep 5 diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh index 3fe640f4df..b36724538b 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh @@ -21,3 +21,6 @@ SUDO='false' BARE='false' ./prepare_node.sh "$HOSTNAME" "$SUDO" "$BARE" + +sync +sleep 5 diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack.sh index 396ce1f991..ed4c94f683 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack.sh @@ -22,3 +22,6 @@ BARE='true' ./prepare_node.sh "$HOSTNAME" "$SUDO" "$BARE" sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack.sh $HOSTNAME + +sync +sleep 5 diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack_new_kernel.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack_new_kernel.sh old mode 100644 new mode 100755 index c12a26515e..76418eaae6 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack_new_kernel.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node_devstack_new_kernel.sh @@ -22,3 +22,6 @@ BARE='true' ./prepare_node.sh "$HOSTNAME" "$SUDO" "$BARE" sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack_new_kernel.sh $HOSTNAME + +sync +sleep 5 diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node_tripleo.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node_tripleo.sh index 84c993e373..e1d0d83478 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node_tripleo.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node_tripleo.sh @@ -24,3 +24,6 @@ BARE='true' sudo ip link set mtu 1458 dev eth0 ./prepare_node.sh "$HOSTNAME" "$SUDO" "$BARE" sudo -u jenkins -i /opt/nodepool-scripts/prepare_tripleo.sh $HOSTNAME + +sync +sleep 5