Skip to content

Commit

Permalink
Disable running playbooks in serial by default
Browse files Browse the repository at this point in the history
Run playbooks in serial are unnecessary and may cause some issue. This
patch disables serial.

This patch also removes the serial for MariaDB playbook. MariaDB handle
this internally.

Partial-Bug: #1668185
Change-Id: I3b4216dd82607475e9bd9b44590b631be4abdbdd
  • Loading branch information
jeffrey4l authored and xNaaro committed Mar 8, 2017
1 parent 1551ee3 commit 1ae26fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion ansible/site.yml
Expand Up @@ -123,7 +123,6 @@

- name: Apply role mariadb
hosts: mariadb
serial: '{{ serial|default("0") }}'
roles:
- { role: mariadb,
tags: mariadb,
Expand Down
@@ -0,0 +1,5 @@
---
features:
- Run ansible playbooks in serial is disabled by default now. Serial is not
recommended. But you can enable it by configuring ANSIBLE_SERIAL
environment variable.
7 changes: 5 additions & 2 deletions tools/kolla-ansible
Expand Up @@ -78,6 +78,9 @@ CONFIG_DIR="/etc/kolla"
PASSWORDS_FILE="${CONFIG_DIR}/passwords.yml"
DANGER_CONFIRM=
INCLUDE_IMAGES=
# Serial is not recommended and disable in default. User could enable it by
# simple configure ANSIBLE_SERIAL variable
ANSIBLE_SERIAL=${ANSIBLE_SERIAL:-0}

while [ "$#" -gt 0 ]; do
case "$1" in
Expand Down Expand Up @@ -205,11 +208,11 @@ EOF
;;
(upgrade)
ACTION="Upgrading OpenStack Environment"
EXTRA_OPTS="$EXTRA_OPTS -e action=upgrade -e serial=30%"
EXTRA_OPTS="$EXTRA_OPTS -e action=upgrade -e serial=${ANSIBLE_SERIAL}"
;;
(reconfigure)
ACTION="Reconfigure OpenStack service"
EXTRA_OPTS="$EXTRA_OPTS -e action=reconfigure -e serial=30%"
EXTRA_OPTS="$EXTRA_OPTS -e action=reconfigure -e serial=${ANSIBLE_SERIAL}"
;;
(stop)
ACTION="Stop Kolla containers"
Expand Down

0 comments on commit 1ae26fa

Please sign in to comment.