diff --git a/ansible/roles/cinder/tasks/bootstrap.yml b/ansible/roles/cinder/tasks/bootstrap.yml index bf17ab6c3a..c9eeb4ed27 100644 --- a/ansible/roles/cinder/tasks/bootstrap.yml +++ b/ansible/roles/cinder/tasks/bootstrap.yml @@ -35,20 +35,5 @@ run_once: True delegate_to: "{{ groups['cinder-api'][0] }}" -- name: Running Cinder bootstrap container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ cinder_api_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_cinder" - restart_policy: "never" - volumes: "{{ node_config_directory }}/cinder-api/:{{ container_config_directory }}/:ro" - run_once: True - delegate_to: "{{ groups['cinder-api'][0] }}" +- include: bootstrap_service.yml when: database_created diff --git a/ansible/roles/cinder/tasks/bootstrap_service.yml b/ansible/roles/cinder/tasks/bootstrap_service.yml new file mode 100644 index 0000000000..fa58ccfd9b --- /dev/null +++ b/ansible/roles/cinder/tasks/bootstrap_service.yml @@ -0,0 +1,17 @@ +--- +- name: Running Cinder bootstrap container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" + detach: False + environment: + KOLLA_BOOTSTRAP: + KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" + image: "{{ cinder_api_image_full }}" + labels: + BOOTSTRAP: + name: "bootstrap_cinder" + restart_policy: "never" + volumes: "{{ node_config_directory }}/cinder-api/:{{ container_config_directory }}/:ro" + run_once: True + delegate_to: "{{ groups['cinder-api'][0] }}" diff --git a/ansible/roles/cinder/tasks/start.yml b/ansible/roles/cinder/tasks/start.yml index 909d238a39..edd08a19b1 100644 --- a/ansible/roles/cinder/tasks/start.yml +++ b/ansible/roles/cinder/tasks/start.yml @@ -10,19 +10,6 @@ - "rsyslog_socket:/var/lib/kolla/rsyslog/" when: inventory_hostname in groups['cinder-api'] -- name: Starting cinder-backup container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - name: "cinder_backup" - image: "{{ cinder_backup_image_full }}" - privileged: True - volumes: - - "{{ node_config_directory }}/cinder-backup/:{{ container_config_directory }}/:ro" - - "/dev/mapper/:/dev/mapper/" - - "rsyslog_socket:/var/lib/kolla/rsyslog/" - when: inventory_hostname in groups['cinder-backup'] - - name: Starting cinder-scheduler container kolla_docker: action: "start_container" @@ -47,3 +34,16 @@ - "/run/:/run/" - "rsyslog_socket:/var/lib/kolla/rsyslog/" when: inventory_hostname in groups['cinder-volume'] + +- name: Starting cinder-backup container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" + name: "cinder_backup" + image: "{{ cinder_backup_image_full }}" + privileged: True + volumes: + - "{{ node_config_directory }}/cinder-backup/:{{ container_config_directory }}/:ro" + - "/run/kolla/log:/dev/log" + - "/dev/mapper/:/dev/mapper/" + when: inventory_hostname in groups['cinder-backup'] diff --git a/ansible/roles/cinder/tasks/upgrade.yml b/ansible/roles/cinder/tasks/upgrade.yml index ed97d539c0..c0e3b19a40 100644 --- a/ansible/roles/cinder/tasks/upgrade.yml +++ b/ansible/roles/cinder/tasks/upgrade.yml @@ -1 +1,7 @@ --- +- include: config.yml + +- include: bootstrap_service.yml + +- include: start.yml + serial: "30%"