Merge lp:~lazypower/charms/trusty/flannel-docker/trunk into lp:charms/trusty/flannel-docker

Proposed by Charles Butler
Status: Merged
Merged at revision: 11
Proposed branch: lp:~lazypower/charms/trusty/flannel-docker/trunk
Merge into: lp:charms/trusty/flannel-docker
Diff against target: 28 lines (+3/-7)
1 file modified
playbooks/network-relation-changed.yaml (+3/-7)
To merge this branch: bzr merge lp:~lazypower/charms/trusty/flannel-docker/trunk
Reviewer Review Type Date Requested Status
Matt Bruzek (community) Approve
Review via email: mp+259786@code.launchpad.net

Description of the change

Older revisions of the charm had edgecase breakage when working with multiple clusters.

The flannel charm now supports working with 2 docker clusters, such as the following

juju deploy cs:~kubernetes/trusty/etcd

juju deploy trusty/docker cluster1
juju add-unit -n 5 cluster1

juju deploy trusty/docker cluster2
juju add-unit -n 5 cluster2

juju deploy flannel-docker
juju add-relation flannel-docker:docker-host cluster1
juju add-relation flannel-docker:docker-host cluster2
juju add-relation flannel-docker:db etcd:client
juju add-relation flannel-docker:network cluster1:network
juju add-relation flannel-docker:network cluster2:network

To post a comment you must log in.
Revision history for this message
Matt Bruzek (mbruzek) wrote :

Greetings Charles!

Thanks for the latest fixes to the flannel-docker charm! The ansible code
change looks safe and logical. I ran this latest
code on our CI system and saw it pass on Azure, HP, and Joyent. I also
deployed the scenario that you listed in the description which worked fine.

I merged your changes with the exising flannel-docker charm. Thank you for
this quality submission!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'playbooks/network-relation-changed.yaml'
--- playbooks/network-relation-changed.yaml 2015-04-01 18:46:10 +0000
+++ playbooks/network-relation-changed.yaml 2015-05-21 15:36:49 +0000
@@ -3,10 +3,6 @@
3# Note: this is necessary when being called from3# Note: this is necessary when being called from
4# network-relation-changed, not from db-relation-joined.4# network-relation-changed, not from db-relation-joined.
55
6- name: Find Docker-Host network relation-id
7 shell: relation-ids network
8 register: docker_host_rel_id
9
10# Read data from flannel config6# Read data from flannel config
11- name: Read Flannel Subnet7- name: Read Flannel Subnet
12 shell: cat /run/flannel/subnet.env | grep FLANNEL_SUBNET | cut -f2 -d"="8 shell: cat /run/flannel/subnet.env | grep FLANNEL_SUBNET | cut -f2 -d"="
@@ -17,10 +13,10 @@
17 register: flannel_mtu13 register: flannel_mtu
1814
19- set_fact:15- set_fact:
20 host_rel_id: "{{ docker_host_rel_id.stdout }}"
21 flannel_mtu: "{{ flannel_mtu.stdout }}"16 flannel_mtu: "{{ flannel_mtu.stdout }}"
22 flannel_subnet: "{{ flannel_subnet.stdout }}"17 flannel_subnet: "{{ flannel_subnet.stdout }}"
18 scoped_network: "{{ relations.network[0].__relid__ | default('') }}"
2319
24- name: Send Data to Docker Host for bridge configuration20- name: Send Data to Docker Host for bridge configuration
25 shell: relation-set -r {{ host_rel_id }} flannel-subnet={{ flannel_subnet }} flannel-mtu={{ flannel_mtu }} overlay_type=udp21 shell: relation-set -r {{ scoped_network }} flannel-subnet={{ flannel_subnet }} flannel-mtu={{ flannel_mtu }} overlay_type=udp
26 when: host_rel_id != ""22 when: scoped_network != ""

Subscribers

People subscribed via source and target branches

to all changes: