Export prepare_node variables rather than pass them around
The prepare_node scripts are primarily called from within nodepool, which only passes in a single argument: the hostname of the node. The rest of the values that we want to pass in to the underlying prepare_node script can be shared through the environment, making order no longer important and alleviating the need to duplicate setting defaults in order to pad positional arguments to a newly created variable. Change-Id: I0a13e27524b75a50a482870414ebe2fd6ac8315e
This commit is contained in:
parent
0bd5abba0f
commit
8bd0056443
@ -17,12 +17,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
SUDO=$2
|
|
||||||
THIN=$3
|
SUDO=${SUDO:-true}
|
||||||
PYTHON3=${4:-false}
|
THIN=${THIN:-true}
|
||||||
PYPY=${5:-false}
|
PYTHON3=${PYTHON3:-false}
|
||||||
ALL_MYSQL_PRIVS=${6:-false}
|
PYPY=${PYPY:-false}
|
||||||
GIT_BASE=${7:-git://git.openstack.org}
|
ALL_MYSQL_PRIVS=${ALL_MYSQL_PRIVS:-false}
|
||||||
|
GIT_BASE=${GIT_BASE:-git://git.openstack.org}
|
||||||
|
|
||||||
# Save the nameservers configured by our provider.
|
# Save the nameservers configured by our provider.
|
||||||
cat >/tmp/forwarding.conf <<EOF
|
cat >/tmp/forwarding.conf <<EOF
|
||||||
|
@ -17,12 +17,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
SUDO='true'
|
|
||||||
THIN='false'
|
|
||||||
PYTHON3='false'
|
|
||||||
PYPY='false'
|
|
||||||
ALL_MYSQL_PRIVS='true'
|
|
||||||
|
|
||||||
./prepare_node.sh "$HOSTNAME" "$SUDO" "$THIN" "$PYTHON3" "$PYPY" "$ALL_MYSQL_PRIVS"
|
export SUDO='true'
|
||||||
|
export THIN='false'
|
||||||
|
export PYTHON='false'
|
||||||
|
export PYPY='false'
|
||||||
|
export ALL_MYSQL_PRIVS='true'
|
||||||
|
|
||||||
|
./prepare_node.sh "$HOSTNAME"
|
||||||
|
|
||||||
./restrict_memory.sh
|
./restrict_memory.sh
|
||||||
|
@ -17,10 +17,11 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
SUDO='true'
|
|
||||||
THIN='true'
|
|
||||||
|
|
||||||
./prepare_node.sh "$HOSTNAME" "$SUDO" "$THIN"
|
export SUDO='true'
|
||||||
sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack.sh $HOSTNAME
|
export THIN='true'
|
||||||
|
|
||||||
|
./prepare_node.sh "$HOSTNAME"
|
||||||
|
sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack.sh "$HOSTNAME"
|
||||||
|
|
||||||
./restrict_memory.sh
|
./restrict_memory.sh
|
||||||
|
@ -17,10 +17,11 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
SUDO='true'
|
|
||||||
THIN='true'
|
|
||||||
|
|
||||||
./prepare_node.sh "$HOSTNAME" "$SUDO" "$THIN"
|
export SUDO='true'
|
||||||
sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack_new_kernel.sh $HOSTNAME
|
export THIN='true'
|
||||||
|
|
||||||
|
./prepare_node.sh "$HOSTNAME"
|
||||||
|
sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack_new_kernel.sh "$HOSTNAME"
|
||||||
|
|
||||||
./restrict_memory.sh
|
./restrict_memory.sh
|
||||||
|
@ -17,12 +17,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
SUDO='false'
|
|
||||||
THIN='false'
|
|
||||||
PYTHON3='true'
|
|
||||||
PYPY='true'
|
|
||||||
ALL_MYSQL_PRIVS='true'
|
|
||||||
|
|
||||||
./prepare_node.sh "$HOSTNAME" "$SUDO" "$THIN" "$PYTHON3" "$PYPY" "$ALL_MYSQL_PRIVS"
|
export SUDO='false'
|
||||||
|
export THIN='false'
|
||||||
|
export PYTHON3='true'
|
||||||
|
export PYPY='true'
|
||||||
|
export ALL_MYSQL_PRIVS='true'
|
||||||
|
|
||||||
|
./prepare_node.sh "$HOSTNAME"
|
||||||
./fix_pip.sh
|
./fix_pip.sh
|
||||||
./restrict_memory.sh
|
./restrict_memory.sh
|
||||||
|
@ -17,13 +17,14 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
SUDO='true'
|
|
||||||
THIN='true'
|
export SUDO='true'
|
||||||
|
export THIN='true'
|
||||||
|
|
||||||
# Workaround bug 1270646 during node bootstrapping.
|
# Workaround bug 1270646 during node bootstrapping.
|
||||||
sudo ip link set mtu 1458 dev eth0
|
sudo ip link set mtu 1458 dev eth0
|
||||||
./prepare_node.sh "$HOSTNAME" "$SUDO" "$THIN"
|
./prepare_node.sh "$HOSTNAME"
|
||||||
sudo -u jenkins -i /opt/nodepool-scripts/prepare_tripleo.sh $HOSTNAME
|
sudo -u jenkins -i /opt/nodepool-scripts/prepare_tripleo.sh "$HOSTNAME"
|
||||||
|
|
||||||
sync
|
sync
|
||||||
sleep 5
|
sleep 5
|
||||||
|
Loading…
Reference in New Issue
Block a user