Merge "Change ansible forks used"
This commit is contained in:
commit
6bf8a7b0f4
@ -7,11 +7,6 @@ gathering = smart
|
|||||||
hostfile = inventory
|
hostfile = inventory
|
||||||
host_key_checking = False
|
host_key_checking = False
|
||||||
|
|
||||||
# Setting forks should be based on your system. The Ansible defaults to 5,
|
|
||||||
# the os-lxc-hosts assumes that you have a system that can support
|
|
||||||
# OpenStack, thus it has been conservatively been set to 15
|
|
||||||
forks = 15
|
|
||||||
|
|
||||||
# Set color options
|
# Set color options
|
||||||
nocolor = 0
|
nocolor = 0
|
||||||
|
|
||||||
|
@ -34,8 +34,6 @@ export DEPLOY_SWIFT=${DEPLOY_SWIFT:-"yes"}
|
|||||||
export DEPLOY_TEMPEST=${DEPLOY_TEMPEST:-"yes"}
|
export DEPLOY_TEMPEST=${DEPLOY_TEMPEST:-"yes"}
|
||||||
# Limit the gate check to only performing one attempt, unless already set
|
# Limit the gate check to only performing one attempt, unless already set
|
||||||
export MAX_RETRIES=${MAX_RETRIES:-"2"}
|
export MAX_RETRIES=${MAX_RETRIES:-"2"}
|
||||||
# limit forks for gate check
|
|
||||||
export FORKS=${FORKS:-10}
|
|
||||||
# tempest and testr options, default is to run tempest in serial
|
# tempest and testr options, default is to run tempest in serial
|
||||||
export RUN_TEMPEST_OPTS=${RUN_TEMPEST_OPTS:-'--serial'}
|
export RUN_TEMPEST_OPTS=${RUN_TEMPEST_OPTS:-'--serial'}
|
||||||
export TESTR_OPTS=${TESTR_OPTS:-''}
|
export TESTR_OPTS=${TESTR_OPTS:-''}
|
||||||
|
@ -95,6 +95,7 @@ pushd "playbooks"
|
|||||||
mkdir -p "${COMMAND_LOGS}/container_net_bounce"
|
mkdir -p "${COMMAND_LOGS}/container_net_bounce"
|
||||||
ansible all_containers -m script \
|
ansible all_containers -m script \
|
||||||
-a '/tmp/ensure_container_networking.sh' \
|
-a '/tmp/ensure_container_networking.sh' \
|
||||||
|
--forks ${FORKS} \
|
||||||
-t "${COMMAND_LOGS}/container_net_bounce" \
|
-t "${COMMAND_LOGS}/container_net_bounce" \
|
||||||
&> ${COMMAND_LOGS}/container_net_bounce.log
|
&> ${COMMAND_LOGS}/container_net_bounce.log
|
||||||
|
|
||||||
@ -105,7 +106,7 @@ pushd "playbooks"
|
|||||||
mkdir -p "${COMMAND_LOGS}/force_apt_update"
|
mkdir -p "${COMMAND_LOGS}/force_apt_update"
|
||||||
ansible all_containers -m raw \
|
ansible all_containers -m raw \
|
||||||
-a '(apt-get update && apt-key update) || true' \
|
-a '(apt-get update && apt-key update) || true' \
|
||||||
--forks 10 \
|
--forks ${FORKS} \
|
||||||
-t "${COMMAND_LOGS}/force_apt_update" \
|
-t "${COMMAND_LOGS}/force_apt_update" \
|
||||||
&> ${COMMAND_LOGS}/force_apt_update.log
|
&> ${COMMAND_LOGS}/force_apt_update.log
|
||||||
fi
|
fi
|
||||||
|
@ -20,10 +20,11 @@ LINE='----------------------------------------------------------------------'
|
|||||||
MAX_RETRIES=${MAX_RETRIES:-5}
|
MAX_RETRIES=${MAX_RETRIES:-5}
|
||||||
MIN_LXC_VG_SIZE_GB=${MIN_LXC_VG_SIZE_GB:-250}
|
MIN_LXC_VG_SIZE_GB=${MIN_LXC_VG_SIZE_GB:-250}
|
||||||
REPORT_DATA=${REPORT_DATA:-""}
|
REPORT_DATA=${REPORT_DATA:-""}
|
||||||
FORKS=${FORKS:-25}
|
|
||||||
ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:-""}
|
ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:-""}
|
||||||
STARTTIME="${STARTTIME:-$(date +%s)}"
|
STARTTIME="${STARTTIME:-$(date +%s)}"
|
||||||
|
|
||||||
|
# the number of forks is set as the number of CPU's present
|
||||||
|
FORKS=${FORKS:-$(grep -c ^processor /proc/cpuinfo)}
|
||||||
|
|
||||||
## Functions -----------------------------------------------------------------
|
## Functions -----------------------------------------------------------------
|
||||||
# Used to retry a process that may fail due to random issues.
|
# Used to retry a process that may fail due to random issues.
|
||||||
@ -56,8 +57,8 @@ function successerator() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install_bits() {
|
function install_bits() {
|
||||||
# The number of forks has been limited to 10 by default (2x ansible default)
|
# Use the successerator to run openstack-ansible with
|
||||||
# This will also run ansible in 3x verbose mode
|
# the appropriate number of forks
|
||||||
successerator openstack-ansible ${ANSIBLE_PARAMETERS} --forks ${FORKS} $@
|
successerator openstack-ansible ${ANSIBLE_PARAMETERS} --forks ${FORKS} $@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,10 +231,10 @@ EOF
|
|||||||
# Destroy all of the known stuff.
|
# Destroy all of the known stuff.
|
||||||
if [ "${ANSIBLE_DESTROY_HOSTS}" == "localhost" ];then
|
if [ "${ANSIBLE_DESTROY_HOSTS}" == "localhost" ];then
|
||||||
echo -e '[all]\nlocalhost ansible_connection=local' | tee /tmp/localhost
|
echo -e '[all]\nlocalhost ansible_connection=local' | tee /tmp/localhost
|
||||||
openstack-ansible -i /tmp/localhost /tmp/destroy_play.yml --forks 5 || true
|
openstack-ansible -i /tmp/localhost /tmp/destroy_play.yml --forks ${FORKS} || true
|
||||||
else
|
else
|
||||||
openstack-ansible lxc-containers-destroy.yml --forks 5 || true
|
openstack-ansible lxc-containers-destroy.yml --forks ${FORKS} || true
|
||||||
openstack-ansible /tmp/destroy_play.yml --forks 5 || true
|
openstack-ansible /tmp/destroy_play.yml --forks ${FORKS} || true
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user