From a15266e43031c9b7f4366c84b5ae6a26dbb30d47 Mon Sep 17 00:00:00 2001 From: "chenshuai@huawei.com" Date: Thu, 28 Jul 2016 22:30:44 -0400 Subject: bugfix: swift ha configuration JIRA: COMPASS-445 Change-Id: I2c2a948ba4bf63311ef23961993881c18a06bab0 Signed-off-by: chenshuai@huawei.com --- .../roles/ha/templates/haproxy.cfg | 7 +++---- .../roles/swift/files/swift-lib.tar.gz | Bin 0 -> 499553 bytes .../openstack_mitaka_xenial/roles/swift/tasks/main.yml | 6 ++++++ .../roles/swift/tasks/swift-compute1.yml | 8 ++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/files/swift-lib.tar.gz diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/ha/templates/haproxy.cfg index 4632c25d..66ea7139 100644 --- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/ha/templates/haproxy.cfg +++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/ha/templates/haproxy.cfg @@ -161,10 +161,9 @@ listen proxy-cinder_api_cluster listen proxy-swift-proxy bind {{ internal_vip.ip }}:8080 bind {{ public_vip.ip }}:8080 - mode tcp - option httpchk - option tcplog - balance source + balance source + option tcpka + option tcplog {% for host,ip in haproxy_hosts.items() %} server {{ host }} {{ ip }}:8080 weight 1 check inter 2000 rise 2 fall 5 {% endfor %} diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/files/swift-lib.tar.gz b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/files/swift-lib.tar.gz new file mode 100644 index 00000000..fdbb38fd Binary files /dev/null and b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/files/swift-lib.tar.gz differ diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml index b50126ae..71d54546 100644 --- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml +++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml @@ -35,3 +35,9 @@ shell: swift-init all start when: inventory_hostname in groups['compute'] ignore_errors: True + +- name: restart tasks on controller + service: name={{ item }} state=restarted enabled=yes + with_items: + - rsync + when: inventory_hostname in groups['compute'] diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/swift-compute1.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/swift-compute1.yml index 06711d3c..8e337163 100644 --- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/swift-compute1.yml +++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/swift-compute1.yml @@ -64,3 +64,11 @@ chown -R root:swift /var/cache/swift; chmod -R 775 /var/cache/swift; +- name: copy swift lib + copy: src=swift-lib.tar.gz dest=/tmp/swift-lib.tar.gz + +- name: untar swift lib + shell: > + tar zxf /tmp/swift-lib.tar.gz; + cp /tmp/swift-lib/* /usr/lib/; + -- cgit 1.2.3-korg