Run rebalance and ensure before swift-proxy
This commit is contained in:
parent
ce4de9efdf
commit
32a1acf138
|
@ -2,6 +2,9 @@
|
|||
|
||||
{%- if proxy.enabled %}
|
||||
|
||||
include:
|
||||
- swift.ring_builder
|
||||
|
||||
swift_proxy_packages:
|
||||
pkg.installed:
|
||||
- names: {{ proxy.pkgs }}
|
||||
|
@ -19,5 +22,9 @@ swift_proxy_services:
|
|||
- names: {{ proxy.services }}
|
||||
- watch:
|
||||
- file: /etc/swift/proxy-server.conf
|
||||
- require:
|
||||
- cmd: swift_ring_object_rebalance
|
||||
- cmd: swift_ring_account_rebalance
|
||||
- cmd: swift_ring_container_rebalance
|
||||
|
||||
{%- endif %}
|
||||
|
|
|
@ -36,21 +36,39 @@ swift_ring_object_{{ device.address }}:
|
|||
- name: swift-ring-builder {{ ring.get("object_builder", "/etc/swift/object.builder") }} add r{{ ring_num }}z{{ loop.index }}-{{ device.address }}:{{ device.get("object_port", 6000) }}/{{ device.device }} {{ device.get("weight", 100) }}
|
||||
- watch:
|
||||
- cmd: swift_ring_object_create
|
||||
- watch_in:
|
||||
- cmd: swift_ring_object_rebalance
|
||||
|
||||
swift_ring_account_{{ device.address }}:
|
||||
cmd.wait:
|
||||
- name: swift-ring-builder {{ ring.get("account_builder", "/etc/swift/account.builder") }} add r{{ ring_num }}z{{ loop.index }}-{{ device.address }}:{{ device.get("account_port", 6000) }}/{{ device.device }} {{ device.get("weight", 100) }}
|
||||
- watch:
|
||||
- cmd: swift_ring_account_create
|
||||
- watch_in:
|
||||
- cmd: swift_ring_account_rebalance
|
||||
|
||||
swift_ring_container_{{ device.address }}:
|
||||
cmd.wait:
|
||||
- name: swift-ring-builder {{ ring.get("container_builder", "/etc/swift/container.builder") }} add r{{ ring_num }}z{{ loop.index }}-{{ device.address }}:{{ device.get("container_port", 6000) }}/{{ device.device }} {{ device.get("weight", 100) }}
|
||||
- watch:
|
||||
- cmd: swift_ring_container_create
|
||||
- watch_in:
|
||||
- cmd: swift_ring_container_rebalance
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
swift_ring_object_rebalance:
|
||||
cmd.wait:
|
||||
- name: swift-ring-builder {{ ring.get("object_builder", "/etc/swift/object.builder") }} rebalance
|
||||
|
||||
swift_ring_account_rebalance:
|
||||
cmd.wait:
|
||||
- name: swift-ring-builder {{ ring.get("account_builder", "/etc/swift/account.builder") }} rebalance
|
||||
|
||||
swift_ring_container_rebalance:
|
||||
cmd.wait:
|
||||
- name: swift-ring-builder {{ ring.get("container_builder", "/etc/swift/container.builder") }} rebalance
|
||||
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue