Skip to content

Commit

Permalink
Fix #342 - Weave network instability
Browse files Browse the repository at this point in the history
  • Loading branch information
tayzlor committed Jun 30, 2015
1 parent af3dfdf commit 575c54f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion roles/weave/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
# defaults file for weave
weave_bridge: "10.2.0.1/16"
weave_bridge: "
{%- for host in groups[weave_server_group] -%}

This comment has been minimized.

Copy link
@pmbauer

pmbauer Jun 30, 2015

Contributor

This approach (same one used for allocating CIDR blocks) is dependent on the iteration order of groups[weave_server_group] and isn't amenable to elastically changing the slave pool size (or replacing failed hosts). What happens if the ansible play is re-run and the order changes (it's not guaranteed). Or if new slaves are added?

#342 (comment)

{%- if host == 'default' or host == inventory_hostname or host == ansible_fqdn or host in ansible_all_ipv4_addresses -%}
10.2.0.{{ loop.index }}/16
{%- endif -%}
{%- endfor -%}
"
weave_server_group: weave_servers
weave_docker_subnet: "
{%- for host in groups[weave_server_group] -%}
Expand Down

0 comments on commit 575c54f

Please sign in to comment.