kolla-ansible/ansible/roles/swift/tasks/rolling_upgrade.yml
Mark Goddard 58d6dc3bcf Don't pull images during upgrade
When adding the rolling upgrade support, some upgrade procedures were
modified to pull images explicitly. This is done inconsistently between
services, and is a change in behaviour from Rocky and earlier releases.

This change removes all image pulling from upgrade tasks.

Change-Id: Id0fed17714235e1daed60b83b1f30620f097eb97
2019-03-20 18:51:45 +00:00

62 lines
2.1 KiB
YAML

---
# Upgrade swift storage nodes first
- include_tasks: config.yml
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server']
# TODO(donghm): Below tasks should be run in serial nodes to
# decrease downtime. Update once the module ansible strategy for
# rolling upgrade will be finished.
- name: Gracefully shutdown swift services in storage nodes
become: true
kolla_docker:
action: "stop_container"
name: "{{ item }}"
with_items:
- "swift_rsyncd"
- "swift_account_server"
- "swift_account_auditor"
- "swift_account_replicator"
- "swift_account_reaper"
- "swift_container_server"
- "swift_container_auditor"
- "swift_container_replicator"
- "swift_container_updater"
- "swift_object_server"
- "swift_object_auditor"
- "swift_object_replicator"
- "swift_object_updater"
- "swift_object_expirer"
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server']
- include_tasks: start.yml
vars:
run_start_swift_proxy_server: "no"
# Upgrade swift proxy nodes
- include_tasks: config.yml
when: inventory_hostname in groups['swift-proxy-server']
- name: Gracefully shutdown swift proxy services in proxy nodes
become: true
kolla_docker:
action: "stop_container"
name: "swift_proxy_server"
when: inventory_hostname in groups['swift-proxy-server']
- name: Start new swift proxy server container
become: true
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_proxy_server_image_full }}"
name: "swift_proxy_server"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-proxy-server/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-proxy-server']