# HG changeset patch # User Vardhnee Ramanujam Ravi # Date 1479257444 28800 # Node ID 014a673c1f622541b0bb8ba2940d243b5ad0275c # Parent e3f0d48b9f515292bf47e9def7b029c4d99d224c 25029929 non-VM ports don't reflect the MTU of the neutron network 25058952 Add log.exception() to the neutron driver for errors diff -r e3f0d48b9f51 -r 014a673c1f62 components/openstack/neutron/files/agent/solaris/interface.py --- a/components/openstack/neutron/files/agent/solaris/interface.py Tue Nov 15 16:45:54 2016 -0800 +++ b/components/openstack/neutron/files/agent/solaris/interface.py Tue Nov 15 16:50:44 2016 -0800 @@ -143,6 +143,7 @@ if network is None: network = self.neutron_client.show_network(network_id)['network'] + mtu = network.get('mtu') network_type = network.get('provider:network_type') vid = None @@ -159,8 +160,8 @@ try: results = get_ovsdb_info('Open_vSwitch', ['other_config']) except Exception as err: - LOG.error(_("Failed to retrieve other_config from %s: %s"), - bridge, err) + LOG.exception(_("Failed to retrieve other_config from %s: %s"), + bridge, err) raise other_config = results[0]['other_config'] if not other_config: @@ -203,6 +204,8 @@ dl = net_lib.Datalink(datalink_name) dl.create_vnic(lower_link, mac_address, vid, temp=True) + if mtu: + dl.set_prop('mtu', mtu) attrs = [('external_ids', {'iface-id': port_id, 'iface-status': 'active', @@ -231,8 +234,8 @@ ovs.delete_port(datalink_name) LOG.debug("Unplugged interface '%s'", datalink_name) except RuntimeError as err: - LOG.error(_("Failed unplugging interface '%s': %s") % - (datalink_name, err)) + LOG.exception(_("Failed unplugging interface '%s': %s") % + (datalink_name, err)) @property def use_gateway_ips(self): diff -r e3f0d48b9f51 -r 014a673c1f62 components/openstack/neutron/files/agent/solaris/net_lib.py --- a/components/openstack/neutron/files/agent/solaris/net_lib.py Tue Nov 15 16:45:54 2016 -0800 +++ b/components/openstack/neutron/files/agent/solaris/net_lib.py Tue Nov 15 16:50:44 2016 -0800 @@ -203,6 +203,13 @@ self.execute_with_pfexec(cmd) + def set_prop(self, pname, pvalue, temp=True): + cmd = ['/usr/sbin/dladm', 'set-linkprop', '-p', '%s=%s' + % (pname, pvalue), self._dlname] + if temp: + cmd.append('-t') + self.execute_with_pfexec(cmd) + def delete_vnic(self): if not self.datalink_exists(self._dlname): return diff -r e3f0d48b9f51 -r 014a673c1f62 components/openstack/neutron/patches/07-ml2-ovs-support.patch --- a/components/openstack/neutron/patches/07-ml2-ovs-support.patch Tue Nov 15 16:45:54 2016 -0800 +++ b/components/openstack/neutron/patches/07-ml2-ovs-support.patch Tue Nov 15 16:50:44 2016 -0800 @@ -228,8 +228,8 @@ + try: + utils.execute(cmd) + except Exception as e: -+ LOG.error(_LE("failed to create VXLAN tunnel end point " -+ "ovs.vxlan1: %s. Agent terminated!") % (e)) ++ LOG.exception(_LE("failed to create VXLAN tunnel end point " ++ "ovs.vxlan1: %s. Agent terminated!") % (e)) + exit(1) + # set openvswitch property to on + try: @@ -241,8 +241,8 @@ + 'openvswitch=on', 'ovs.vxlan1'] + utils.execute(cmd) + except Exception as e: -+ LOG.error(_LE("failed to set 'openvswitch' property on " -+ "ovs.vxlan1: %s. Agent terminated!") % (e)) ++ LOG.exception(_LE("failed to set 'openvswitch' property on " ++ "ovs.vxlan1: %s. Agent terminated!") % (e)) + exit(1) + + attrs = [('type', 'vxlan'),