diff options
| author | Michal (inc0) Jastrzebski <inc007@gmail.com> | 2016-02-22 22:01:06 +0000 |
|---|---|---|
| committer | Michal (inc0) Jastrzebski <inc007@gmail.com> | 2016-02-25 19:05:20 +0000 |
| commit | 097e259ee90fc2aa829945a13e9397ca5090e785 (patch) | |
| tree | 635ecb31cb35bdaf718e5a18e58144d579909ed0 | |
| parent | 558190592e9dfd6e221e4caeb9e1bf77e22b0fc4 (diff) | |
| download | kolla-097e259ee90fc2aa829945a13e9397ca5090e785.tar.gz kolla-097e259ee90fc2aa829945a13e9397ca5090e785.zip | |
HAProxy and Keepalived upgrade
This is single task to upgrade both haproxy and keepalived. It stops
slave nodes of keepalived and upgrades them separately to avoid
VIP migration and allow nearly no-downtime upgrade
Change-Id: I06124635a3f3553a4e8e91013cefbf897dd7179f
Implements: blueprint upgrade-haproxy
Implements: blueprint upgrade-keepalived
Partially-implements: blueprint upgrade-kolla
| -rw-r--r-- | ansible/roles/haproxy/tasks/upgrade.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ansible/roles/haproxy/tasks/upgrade.yml b/ansible/roles/haproxy/tasks/upgrade.yml index ed97d539c..c4670a5aa 100644 --- a/ansible/roles/haproxy/tasks/upgrade.yml +++ b/ansible/roles/haproxy/tasks/upgrade.yml @@ -1 +1,19 @@ --- +- include: config.yml + +- set_fact: secondary_addresses={{ hostvars[inventory_hostname]['ansible_' + api_interface].get('ipv4_secondaries', []) | map(attribute='address') | list }} + +- name: Stopping all slave keepalived containers + kolla_docker: + action: "stop_container" + common_options: "{{ docker_common_options }}" + name: "keepalived" + when: kolla_internal_address not in secondary_addresses + +# Upgrading master keepalived and haproxy +- include: start.yml + when: kolla_internal_address in secondary_addresses + +# Upgrading slave keepalived and haproxy +- include: start.yml + when: kolla_internal_address not in secondary_addresses |
