Merge lp:~james-page/charms/trusty/neutron-calico/etcd-proxy into lp:~project-calico/charms/trusty/neutron-calico/trunk

Proposed by James Page
Status: Rejected
Rejected by: Cory Benfield
Proposed branch: lp:~james-page/charms/trusty/neutron-calico/etcd-proxy
Merge into: lp:~project-calico/charms/trusty/neutron-calico/trunk
Diff against target: 46 lines (+6/-13)
2 files modified
hooks/neutron_calico_context.py (+5/-12)
metadata.yaml (+1/-1)
To merge this branch: bzr merge lp:~james-page/charms/trusty/neutron-calico/etcd-proxy
Reviewer Review Type Date Requested Status
Cory Benfield Pending
Review via email: mp+265014@code.launchpad.net

Description of the change

Switch to using etcd charm with non-ambiguous relation type.

To post a comment you must log in.
58. By James Page

Update to correct interface name, not type

Revision history for this message
Cory Benfield (cory-benfield) wrote :

Thanks for this James!

Right now I'm holding off on merging this until I've arranged with the OIL to do a managed transition to a new bundle, which will hopefully be in the next couple of days.

Revision history for this message
James Page (james-page) wrote :

Awesome; once we have these changes landed, I'm +1 on all of the charm work to support Calico!

Revision history for this message
Cory Benfield (cory-benfield) wrote :

Ok, this merge request was superseded by this one[0], which has now been merged. That one contains a few extra changes, and is the one that has been tested by the OIL.

Looks like we're back to you to re-review the outstanding Calico bugs for the charms!

[0]: https://code.launchpad.net/~project-calico/charms/trusty/neutron-calico/next/+merge/268709

Unmerged revisions

58. By James Page

Update to correct interface name, not type

57. By James Page

Switch to using offical etcd charm for etcd-proxy

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/neutron_calico_context.py'
2--- hooks/neutron_calico_context.py 2015-04-23 12:38:43 +0000
3+++ hooks/neutron_calico_context.py 2015-07-16 15:49:41 +0000
4@@ -105,24 +105,17 @@
5
6
7 class EtcdContext(context.OSContextGenerator):
8- interfaces = ['http']
9+ interfaces = ['etcd-peer']
10
11 def __call__(self):
12 peers = []
13- ctxt = {'cluster': ''}
14+ ctxt = {}
15
16 for rid in relation_ids('etcd-peer'):
17 for unit in related_units(rid):
18 rdata = relation_get(rid=rid, unit=unit)
19- peers.append({
20- 'ip': rdata.get('ip'),
21- 'port': rdata.get('port'),
22- 'name': rdata.get('name'),
23- })
24-
25- cluster_string = ','.join(
26- '{name}=http://{ip}:{port}'.format(**p) for p in peers
27- )
28- ctxt['cluster'] = cluster_string
29+ if rdata.get('cluster'):
30+ ctxt['cluster'] = rdata.get('cluster')
31+ break
32
33 return ctxt
34
35=== modified file 'metadata.yaml'
36--- metadata.yaml 2015-04-16 12:41:16 +0000
37+++ metadata.yaml 2015-07-16 15:49:41 +0000
38@@ -31,7 +31,7 @@
39 bgp-route-reflector:
40 interface: bgp-route-reflector
41 etcd-peer:
42- interface: http
43+ interface: etcd-proxy
44 peers:
45 cluster:
46 interface: neutron-calico-ha

Subscribers

People subscribed via source and target branches