Merge lp:~celebdor/charms/trusty/nova-cloud-controller/midonet into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Antoni Segura Puimedon
Status: Rejected
Rejected by: James Page
Proposed branch: lp:~celebdor/charms/trusty/nova-cloud-controller/midonet
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 219 lines (+73/-11)
8 files modified
config.yaml (+6/-0)
hooks/charmhelpers/contrib/openstack/amulet/utils.py (+1/-1)
hooks/charmhelpers/contrib/openstack/context.py (+30/-4)
hooks/charmhelpers/contrib/openstack/neutron.py (+17/-3)
hooks/charmhelpers/contrib/openstack/templates/ceph.conf (+6/-0)
templates/juno/nova.conf (+7/-1)
templates/kilo/nova.conf (+5/-1)
tests/charmhelpers/contrib/openstack/amulet/utils.py (+1/-1)
To merge this branch: bzr merge lp:~celebdor/charms/trusty/nova-cloud-controller/midonet
Reviewer Review Type Date Requested Status
James Page Needs Fixing
Review via email: mp+273717@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10678 nova-cloud-controller-next for celebdor mp273717
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10678/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7189 nova-cloud-controller-next for celebdor mp273717
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12706944/
Build: http://10.245.162.77:8080/job/charm_amulet_test/7189/

Revision history for this message
James Page (james-page) :
review: Needs Fixing
Revision history for this message
Antoni Segura Puimedon (celebdor) :
Revision history for this message
James Page (james-page) :

Unmerged revisions

200. By Antoni Segura Puimedon <email address hidden>

Add template and config changes for MidoNet neutron plugin support

199. By Antoni Segura Puimedon <email address hidden>

CH sync for MidoNet support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2015-10-02 12:05:06 +0000
3+++ config.yaml 2015-10-07 15:52:42 +0000
4@@ -420,3 +420,9 @@
5 under the "filter:ratelimit" section as "limits". The syntax for these
6 rules is documented at
7 http://docs.openstack.org/kilo/config-reference/content/configuring-compute-API.html
8+ shared_secret:
9+ default: ""
10+ type: string
11+ description: |
12+ Shared secret between neutron-metadata agent and the nova-api metadata
13+ server for signed communication (Used for MidoNet deployments).
14
15=== modified file 'hooks/charmhelpers/contrib/openstack/amulet/utils.py'
16--- hooks/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-22 02:07:16 +0000
17+++ hooks/charmhelpers/contrib/openstack/amulet/utils.py 2015-10-07 15:52:42 +0000
18@@ -752,7 +752,7 @@
19 self.log.debug('SSL is enabled @{}:{} '
20 '({})'.format(host, port, unit_name))
21 return True
22- elif not port and not conf_ssl:
23+ elif not conf_ssl:
24 self.log.debug('SSL not enabled @{}:{} '
25 '({})'.format(host, port, unit_name))
26 return False
27
28=== modified file 'hooks/charmhelpers/contrib/openstack/context.py'
29--- hooks/charmhelpers/contrib/openstack/context.py 2015-09-22 02:45:17 +0000
30+++ hooks/charmhelpers/contrib/openstack/context.py 2015-10-07 15:52:42 +0000
31@@ -14,6 +14,7 @@
32 # You should have received a copy of the GNU Lesser General Public License
33 # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
34
35+import glob
36 import json
37 import os
38 import re
39@@ -951,6 +952,19 @@
40 'config': config}
41 return ovs_ctxt
42
43+ def midonet_ctxt(self):
44+ driver = neutron_plugin_attribute(self.plugin, 'driver',
45+ self.network_manager)
46+ midonet_config = neutron_plugin_attribute(self.plugin, 'config',
47+ self.network_manager)
48+ mido_ctxt = {'core_plugin': driver,
49+ 'neutron_plugin': 'midonet',
50+ 'neutron_security_groups': self.neutron_security_groups,
51+ 'local_ip': unit_private_ip(),
52+ 'config': midonet_config}
53+
54+ return mido_ctxt
55+
56 def __call__(self):
57 if self.network_manager not in ['quantum', 'neutron']:
58 return {}
59@@ -972,6 +986,8 @@
60 ctxt.update(self.nuage_ctxt())
61 elif self.plugin == 'plumgrid':
62 ctxt.update(self.pg_ctxt())
63+ elif self.plugin == 'midonet':
64+ ctxt.update(self.midonet_ctxt())
65
66 alchemy_flags = config('neutron-alchemy-flags')
67 if alchemy_flags:
68@@ -1363,7 +1379,7 @@
69 normalized.update({port: port for port in resolved
70 if port in ports})
71 if resolved:
72- return {bridge: normalized[port] for port, bridge in
73+ return {normalized[port]: bridge for port, bridge in
74 six.iteritems(portmap) if port in normalized.keys()}
75
76 return None
77@@ -1374,12 +1390,22 @@
78 def __call__(self):
79 ctxt = {}
80 mappings = super(PhyNICMTUContext, self).__call__()
81- if mappings and mappings.values():
82- ports = mappings.values()
83+ if mappings and mappings.keys():
84+ ports = sorted(mappings.keys())
85 napi_settings = NeutronAPIContext()()
86 mtu = napi_settings.get('network_device_mtu')
87+ all_ports = set()
88+ # If any of ports is a vlan device, its underlying device must have
89+ # mtu applied first.
90+ for port in ports:
91+ for lport in glob.glob("/sys/class/net/%s/lower_*" % port):
92+ lport = os.path.basename(lport)
93+ all_ports.add(lport.split('_')[1])
94+
95+ all_ports = list(all_ports)
96+ all_ports.extend(ports)
97 if mtu:
98- ctxt["devs"] = '\\n'.join(ports)
99+ ctxt["devs"] = '\\n'.join(all_ports)
100 ctxt['mtu'] = mtu
101
102 return ctxt
103
104=== modified file 'hooks/charmhelpers/contrib/openstack/neutron.py'
105--- hooks/charmhelpers/contrib/openstack/neutron.py 2015-09-22 02:45:17 +0000
106+++ hooks/charmhelpers/contrib/openstack/neutron.py 2015-10-07 15:52:42 +0000
107@@ -209,6 +209,20 @@
108 'server_packages': ['neutron-server',
109 'neutron-plugin-plumgrid'],
110 'server_services': ['neutron-server']
111+ },
112+ 'midonet': {
113+ 'config': '/etc/neutron/plugins/midonet/midonet.ini',
114+ 'driver': 'midonet.neutron.plugin.MidonetPluginV2',
115+ 'contexts': [
116+ context.SharedDBContext(user=config('neutron-database-user'),
117+ database=config('neutron-database'),
118+ relation_prefix='neutron',
119+ ssl_dir=NEUTRON_CONF_DIR)],
120+ 'services': [],
121+ 'packages': [[headers_package()] + determine_dkms_package()],
122+ 'server_packages': ['neutron-server',
123+ 'python-neutron-plugin-midonet'],
124+ 'server_services': ['neutron-server']
125 }
126 }
127 if release >= 'icehouse':
128@@ -310,10 +324,10 @@
129 def parse_data_port_mappings(mappings, default_bridge='br-data'):
130 """Parse data port mappings.
131
132- Mappings must be a space-delimited list of port:bridge mappings.
133+ Mappings must be a space-delimited list of bridge:port.
134
135- Returns dict of the form {port:bridge} where port may be an mac address or
136- interface name.
137+ Returns dict of the form {port:bridge} where ports may be mac addresses or
138+ interface names.
139 """
140
141 # NOTE(dosaboy): we use rvalue for key to allow multiple values to be
142
143=== modified file 'hooks/charmhelpers/contrib/openstack/templates/ceph.conf'
144--- hooks/charmhelpers/contrib/openstack/templates/ceph.conf 2015-07-16 20:18:38 +0000
145+++ hooks/charmhelpers/contrib/openstack/templates/ceph.conf 2015-10-07 15:52:42 +0000
146@@ -13,3 +13,9 @@
147 err to syslog = {{ use_syslog }}
148 clog to syslog = {{ use_syslog }}
149
150+[client]
151+{% if rbd_client_cache_settings -%}
152+{% for key, value in rbd_client_cache_settings.iteritems() -%}
153+{{ key }} = {{ value }}
154+{% endfor -%}
155+{%- endif %}
156\ No newline at end of file
157
158=== modified file 'templates/juno/nova.conf'
159--- templates/juno/nova.conf 2015-09-17 20:15:37 +0000
160+++ templates/juno/nova.conf 2015-10-07 15:52:42 +0000
161@@ -60,7 +60,7 @@
162 rbd_secret_uuid = {{ rbd_secret_uuid }}
163 {% endif -%}
164
165-{% if neutron_plugin and neutron_plugin == 'ovs' -%}
166+{% if neutron_plugin and neutron_plugin in ('ovs', 'midonet') -%}
167 libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
168 libvirt_user_virtio_for_bridges = True
169 {% if neutron_security_groups -%}
170@@ -158,6 +158,12 @@
171 admin_password = {{ admin_password }}
172 {% endif -%}
173
174+{% if neutron_plugin and neutron_plugin == 'midonet' -%}
175+[neutron]
176+service_metadata_proxy = True
177+metadata_proxy_shared_secret = {{ shared_secret }}
178+{% endif -%}
179+
180 [osapi_v3]
181 enabled=True
182
183
184=== modified file 'templates/kilo/nova.conf'
185--- templates/kilo/nova.conf 2015-09-17 20:15:37 +0000
186+++ templates/kilo/nova.conf 2015-10-07 15:52:42 +0000
187@@ -53,7 +53,7 @@
188 rbd_secret_uuid = {{ rbd_secret_uuid }}
189 {% endif -%}
190
191-{% if neutron_plugin and neutron_plugin == 'ovs' -%}
192+{% if neutron_plugin and neutron_plugin in ('ovs', 'midonet') -%}
193 libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
194 libvirt_user_virtio_for_bridges = True
195 {% if neutron_security_groups -%}
196@@ -143,6 +143,10 @@
197 admin_username = {{ admin_user }}
198 admin_password = {{ admin_password }}
199 admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
200+{% if neutron_plugin and neutron_plugin == 'midonet' -%}
201+service_metadata_proxy = True
202+metadata_proxy_shared_secret = {{ shared_secret }}
203+{% endif -%}
204 {% endif -%}
205 {% endif -%}
206
207
208=== modified file 'tests/charmhelpers/contrib/openstack/amulet/utils.py'
209--- tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-22 02:07:16 +0000
210+++ tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-10-07 15:52:42 +0000
211@@ -752,7 +752,7 @@
212 self.log.debug('SSL is enabled @{}:{} '
213 '({})'.format(host, port, unit_name))
214 return True
215- elif not port and not conf_ssl:
216+ elif not conf_ssl:
217 self.log.debug('SSL not enabled @{}:{} '
218 '({})'.format(host, port, unit_name))
219 return False

Subscribers

People subscribed via source and target branches