From 1d6e6899f605a034474e4ff1e84ca738fc5231ca Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Sun, 5 Jul 2015 12:13:18 +0000 Subject: [PATCH] Change restart policy for bootstrap container Sets the restart policy to 'no' for bootstrap containers Change-Id: I1044fdc70a6b7d50396fd923b6be67bd7c47faa2 Closes-Bug: 1471536 --- ansible/roles/database/tasks/bootstrap.yml | 5 ++--- ansible/roles/keystone/tasks/bootstrap.yml | 1 + ansible/roles/message-broker/tasks/bootstrap.yml | 1 + ansible/roles/start.yml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/roles/database/tasks/bootstrap.yml b/ansible/roles/database/tasks/bootstrap.yml index 4a46ee7cb0..6653ebbd75 100644 --- a/ansible/roles/database/tasks/bootstrap.yml +++ b/ansible/roles/database/tasks/bootstrap.yml @@ -38,13 +38,11 @@ - include: ../../start.yml vars: - container_environment: - KOLLA_BOOTSTRAP: + container_command: "/bin/sleep infinity" container_image: "{{ docker_database_image_full }}" container_name: "mariadb_data" container_volumes: - "/var/lib/mysql/" - container_command: "/bin/sleep infinity" - include: ../../start.yml vars: @@ -54,6 +52,7 @@ DB_ROOT_PASSWORD: "{{ database_password }}" container_image: "{{ docker_database_image_full }}" container_name: "mariadb" + container_restart_policy: "no" container_volumes: - "{{ node_config_directory }}/mariadb/:/opt/kolla/mariadb/:ro" container_volumes_from: diff --git a/ansible/roles/keystone/tasks/bootstrap.yml b/ansible/roles/keystone/tasks/bootstrap.yml index 0e4c98ca4a..98610db349 100644 --- a/ansible/roles/keystone/tasks/bootstrap.yml +++ b/ansible/roles/keystone/tasks/bootstrap.yml @@ -10,5 +10,6 @@ KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" container_image: "{{ docker_keystone_image_full }}" container_name: "bootstrap_keystone" + container_restart_policy: "no" container_volumes: - "{{ node_config_directory }}/keystone/:/opt/kolla/keystone/:ro" diff --git a/ansible/roles/message-broker/tasks/bootstrap.yml b/ansible/roles/message-broker/tasks/bootstrap.yml index 3cc2d51e51..df974055b7 100644 --- a/ansible/roles/message-broker/tasks/bootstrap.yml +++ b/ansible/roles/message-broker/tasks/bootstrap.yml @@ -24,6 +24,7 @@ RABBITMQ_CLUSTER_COOKIE: "{{ rabbitmq_cluster_cookie }}" container_image: "{{ docker_message_broker_image_full }}" container_name: "rabbitmq_bootstrap" + container_restart_policy: "no" container_volumes: - "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro" container_volumes_from: diff --git a/ansible/roles/start.yml b/ansible/roles/start.yml index 4925ba3635..4e202da3ec 100644 --- a/ansible/roles/start.yml +++ b/ansible/roles/start.yml @@ -23,7 +23,7 @@ privileged: "{{ container_privileged | default('False') }}" pull: "{{ docker_pull_policy }}" registry: "{{ docker_registry }}" - restart_policy: "{{ docker_restart_policy }}" + restart_policy: "{{ container_restart_policy | default(docker_restart_policy) }}" restart_policy_retry: "{{ docker_restart_policy_retry }}" state: "reloaded" username: "{{ docker_registry_username }}"